diff --git a/src/axios.js b/src/axios.js
index 148d03f5..9cc06217 100644
--- a/src/axios.js
+++ b/src/axios.js
@@ -140,10 +140,9 @@ axios.interceptors.response.use(
}
setTimeout(() => {
msg.value = '';
- }, 0);
+ }, 50);
msg.value=message
-
- return Promise.reject(new Error(message));
+ return Promise.reject(new Error(message));
}
// 正常状态返回responseData
return res;
diff --git a/src/store/modules/tags.js b/src/store/modules/tags.js
index fceef25f..b9ddf2b9 100644
--- a/src/store/modules/tags.js
+++ b/src/store/modules/tags.js
@@ -1,41 +1,43 @@
-import { setStore, getStore } from 'utils/store';
-import website from '@/config/website';
+import { setStore, getStore } from 'utils/store';// 从 'utils/store' 导入 setStore 和 getStore 方法
+import website from '@/config/website';// 从项目的配置文件中导入 website 对象
-const tagWel = website.fistPage;
+const tagWel = website.fistPage;// 从 website 配置中获取第一个页面的配置
const navs = {
state: {
- tagList: getStore({ name: 'tagList' }) || [],
- tag: getStore({ name: 'tag' }) || {},
- tagWel: tagWel,
+ tagList: getStore({ name: 'tagList' }) || [], // 尝试从本地存储获取标签列表,如果没有则设为空数组
+ tag: getStore({ name: 'tag' }) || {}, // 尝试从本地存储获取当前标签,如果没有则设为空对象
+ tagWel: tagWel, // 设置第一个页面的配置为 tagWel
},
mutations: {
+ // 添加新的标签
ADD_TAG: (state, action) => {
if (typeof action.name == 'function') action.name = action.name(action.query);
- state.tag = action;
- setStore({ name: 'tag', content: state.tag });
- if (state.tagList.some(ele => ele.fullPath == action.fullPath)) return;
- state.tagList.push(action);
- setStore({ name: 'tagList', content: state.tagList });
+ state.tag = action;// 设置当前的标签
+ setStore({ name: 'tag', content: state.tag });// 在本地存储中保存当前标签
+ if (state.tagList.some(ele => ele.fullPath == action.fullPath)) return; // 如果列表中已经有了这个标签则不添加
+ state.tagList.push(action);// 将新标签添加到列表中
+ setStore({ name: 'tagList', content: state.tagList }); // 在本地存储中保存标签列表
},
// 关闭指定标签
DEL_TAG: (state, action) => {
state.tagList = state.tagList.filter(item => {
- return item.fullPath !== action.fullPath;
+ return item.fullPath !== action.fullPath;// 保留列表中不是指定路径的标签
});
- setStore({ name: 'tagList', content: state.tagList });
+ setStore({ name: 'tagList', content: state.tagList });// 更新本地存储中的标签列表
},
+ // 关闭所有标签
DEL_ALL_TAG: (state, tagList = []) => {
- state.tagList = tagList;
- setStore({ name: 'tagList', content: state.tagList });
+ state.tagList = tagList;// 清空标签列表
+ setStore({ name: 'tagList', content: state.tagList });// 更新本地存储
},
// 关闭除了当前页面的所有页面
DEL_TAG_OTHER: state => {
state.tagList = state.tagList.filter(item => {
console.log("关闭其他111state.tag.fullPath, website.fistPage.path",state.tag.fullPath, website.fistPage.path,item);
- return [state.tag.fullPath, website.fistPage.path].includes(item.fullPath);
+ return [state.tag.fullPath, website.fistPage.path].includes(item.fullPath);// 保留当前路径和第一个页面的路径
});
console.log("2222state.tagList",state.tagList);
- setStore({ name: 'tagList', content: state.tagList });
+ setStore({ name: 'tagList', content: state.tagList });// 更新本地存储
},
// 关闭当前页面
DEL_TAG_CURRENT: state => {
@@ -45,10 +47,10 @@ const navs = {
// this.demoData = this.demoData.filter((o) => {
// return state.tag.fullPath !== del
// })
- return state.tag.fullPath !== item.fullPath;
+ return state.tag.fullPath !== item.fullPath;// 保留不是当前路径的标签
});
// console.log("state.tagList",state.tagList);
- setStore({ name: 'tagList', content: state.tagList });
+ setStore({ name: 'tagList', content: state.tagList });// 更新本地存储
},
},
};
diff --git a/src/views/aftersales/aftersalesWorkOrder.vue b/src/views/aftersales/aftersalesWorkOrder.vue
index 2a180f22..f87f6b9f 100644
--- a/src/views/aftersales/aftersalesWorkOrder.vue
+++ b/src/views/aftersales/aftersalesWorkOrder.vue
@@ -1800,18 +1800,21 @@ const IndexTable = (val,Refresh) => {
console.log(res, '初始化返回值');
details.loadingObj.list = false; //关闭动画加载
if (res.data.data) {
+ console.log(res.data.data, '初始化返回值===>');
+ console.log(res.data.data.records.length,'res.data.data.records');
+ console.log(TabList.value,'TabList.value===>');
// page.value.total = res.data.data.total; //总页数
if (res.data.data.records.length) {
- Statusprocessing(res.data.data.records);
-
+ console.log(res.data.data.records,'res.data.data.records有值');
TabList.value.find(res=>res.name == TabPermissions.value).DataList = res.data.data.records
TabList.value.find(res=>res.name == TabPermissions.value).total = res.data.data.total
TabList.value.find(res=>res.name == TabPermissions.value).request=false
-
console.log(TabList.value,'当前存储的值');
// details.data = res.data.data.records;
details.data = TabList.value.find(res=>res.name == TabPermissions.value).DataList
page.value.total = TabList.value.find(res=>res.name == TabPermissions.value).total
+ console.log(TabList.value,'TabList.value===>');
+ Statusprocessing(res.data.data.records);
} else {
// details.data = res.data.data.records;
details.data = TabList.value.find(res=>res.name == TabPermissions.value).DataList;
@@ -2314,6 +2317,9 @@ const appeal = (val, state) => {
};
// 确定理赔金额
const DetermineClaims = val => {
+
+
+
console.log(val.row);
let data = {
id: val.row.lawoId,
@@ -2324,14 +2330,13 @@ const DetermineClaims = val => {
$_settlementUpdate(data)
.then(res => {
console.log(res);
- details.loadingObj.list = false; //关闭动画加载
if (res.data.code == 200) {
- tabChenge(TabPermissions.value);
+ tabChenge(TabPermissions.value,{},true);
}
})
.catch(res => {
details.loadingObj.list = false; //关闭动画加载
- });
+ })
};
// 理赔金额未出编辑操作
const Resultediting = val => {
@@ -2349,6 +2354,7 @@ const Resultediting = val => {
workOrderNumber: val.row.workOrderNumber,
RouterState: 'Kfend',
Processingresults: true, //理赔编辑
+ Resultediting:true,//编辑理赔金额
index: '1',
},
});
@@ -2913,7 +2919,7 @@ const AppealTab = val => {
let data = {
...details.query,
};
- IndexTable(data);
+ IndexTable(data,true);
} else {
AppealListFn(); //申诉列表函数
}
@@ -3478,7 +3484,7 @@ const DetermineStorage = val => {
});
}
console.log(res, '处理完毕确定');
- tabChenge(TabPermissions.value);
+ tabChenge(TabPermissions.value,{},true);
})
.catch(res => {
console.log(res, '错误信息');
@@ -3616,7 +3622,7 @@ const ResultConfirmation = val => {
type: 'success',
});
}
- tabChenge(TabPermissions.value);
+ tabChenge(TabPermissions.value,{},true);
})
.catch(res => {
console.log(res, '错误信息');
@@ -3692,7 +3698,7 @@ const ResultConfirmation = val => {
});
}
console.log(res, '处理完毕确定');
- tabChenge(TabPermissions.value);
+ tabChenge(TabPermissions.value,{},true);
})
.catch(res => {
console.log(res, '错误信息');
diff --git a/src/views/aftersales/aftersalesWorkOrderInfo.vue b/src/views/aftersales/aftersalesWorkOrderInfo.vue
index 2bbe2cfd..7704117f 100644
--- a/src/views/aftersales/aftersalesWorkOrderInfo.vue
+++ b/src/views/aftersales/aftersalesWorkOrderInfo.vue
@@ -1522,6 +1522,7 @@ const CustomerServiceCompleted = () => {
RouterState: 'Kfend',
workOrderStatus: $route.query.workOrderStatus, //当前单子状态
CompletedEditing: 'true', //可以编辑完结信息编辑
+ CustomerServiceCompleted: 'true', //客服仲裁完结
index: '1',
},
});
@@ -1538,6 +1539,7 @@ const EditInformation = () => {
warehouseId: $route.query.warehouseId,
workOrderNumber: $route.query.workOrderNumber,
RouterState: 'Infoedit',
+ EditInformation:true, //可以编辑完结信息编辑
ProcessType: $route.query.ProcessType, //类型 1 待处理 2 已处理
ProcessingresultsState:UserPermissions.value !='仓库客服'?true:false, //
workOrderStatus: $route.query.workOrderStatus, //当前单子状态
@@ -1558,7 +1560,7 @@ const AppealEstablished = () => {
workOrderStatus: $route.query.workOrderStatus, //当前单子状态
Appealeditor: 'appeal', //申诉编辑
appealID: $route.query.appealID, //申诉ID
- AppealEstablished: 'true', //申诉成立
+ AppealEstablished: true, //申诉成立
},
});
};
diff --git a/src/views/aftersales/aftersalesWorkOrdermodify.vue b/src/views/aftersales/aftersalesWorkOrdermodify.vue
index c30e058b..8e809fad 100644
--- a/src/views/aftersales/aftersalesWorkOrdermodify.vue
+++ b/src/views/aftersales/aftersalesWorkOrdermodify.vue
@@ -425,7 +425,7 @@
:reserve-keyword="false"
placeholder="请选择处理结果"
@change="changeProcessingResults"
- :disabled="Appealeditor == 'appeal'"
+ :disabled="ProcessingProhibited"
>
@@ -468,7 +468,7 @@
@@ -479,7 +479,7 @@
format="YYYY-MM-DD"
value-format="YYYY-MM-DD HH:mm:ss"
placeholder="支付时间"
- :disabled="Appealeditor == 'appeal' && CompletedEditing"
+ :disabled="ProcessingProhibited"
class="el_Claimpaymenttime"
/>
@@ -499,13 +499,13 @@
clearable
:autosize="{ minRows: 3, maxRows: 4 }"
type="textarea"
- :disabled="Appealeditor == 'appeal'"
+ :disabled="ProcessingProhibited"
/>
-
+
@@ -542,7 +542,7 @@
v-model="item.warehouseId"
filterable
placeholder="请选择仓库"
- :disabled="ProcessingresultsState"
+ :disabled="CompleteDisabling"
>
@@ -569,7 +569,7 @@
:min="0"
v-model="item.num"
placeholder="金额"
- :disabled="ProcessingresultsState"
+ :disabled="CompleteDisabling"
/>
@@ -582,7 +582,7 @@
placeholder="请填写责任人"
clearable
:rows="2"
- :disabled="ProcessingresultsState"
+ :disabled="CompleteDisabling"
/>
@@ -668,8 +668,8 @@
@@ -832,6 +850,7 @@ const ShortageList = ref([]); //少货件数
const fleeingList = ref([]); //窜货件数
const valueStrictly = ref();
const routerID = ref(null); //路由参数ID
+const ProcessingProhibited= ref(true);//是否可以编辑处理结果
const routerState = ref(''); //路由状态
const personResponsibleList = ref([]); //责任人列表
const companyProportion = ref(100); //公司占比
@@ -869,6 +888,7 @@ const CompletedEditing = ref(false); //完结编辑
const amplifyurl = ref(''); //当前点击的图片
const amplifysrcList = ref([]); //图片循环列表
const ProcessingresultsState = ref(false); //理赔是否可以编辑
+const CompleteDisabling=ref(true);//完结信息是否可以编辑
const ProcessedId = ref(null); //处理完毕里面编辑的iD
const Copyprocessingresults = ref(); //处理结果拷贝
const UserPermissions=ref('');//存储当前角色信息
@@ -880,26 +900,26 @@ const markFieldAsModified = fieldName => {
modifiedFields.value.add(fieldName);
};
const CompensationParty = ref([
- // {
- // name: '',
- // state: 0,
- // num: null,
- // reason: '',
- // cld: 1,
- // explains: '',
- // warehouseId: '',
- // personResponsibleList: '',
- // }, //赔款方
- // {
- // name: '',
- // state: 1,
- // num: null,
- // reason: '',
- // cld: 1,
- // explains: '',
- // warehouseId: '',
- // personResponsibleList: '',
- // }, //受款方
+ {
+ name: '',
+ state: 0,
+ num: 0,
+ reason: '',
+ cld: 1,
+ explains: '',
+ warehouseId: '',
+ personResponsibleList: '',
+ }, //赔款方
+ {
+ name: '',
+ state: 1,
+ num: 0,
+ reason: '',
+ cld: 1,
+ explains: '',
+ warehouseId: '',
+ personResponsibleList: '',
+ }, //受款方
]); //收/赔
const PackageInfo = ref([
//包件信息
@@ -1063,14 +1083,32 @@ const onLoad = () => {
CompletedEditing.value = false;
}
// 判断是否为理赔金未出编辑
- if ($route.query.ProcessingresultsState == true && UserPermissions.value !='仓库客服' ) {
+ if ($route.query.ProcessingresultsState && UserPermissions.value !='仓库客服' ) {
console.log($route.query.Processingresults, '理赔金未出编辑');
ProcessingresultsState.value = false;
} else{
ProcessingresultsState.value = true;
}
+ // 客服仲裁完结提交(完结信息)
+ if($route.query.CustomerServiceCompleted && UserPermissions.value !='仓库客服'){
+ CompleteDisabling.value = false;
+ }else{
+ CompleteDisabling.value = true;
+ }
+ // 仲裁成立编辑完结信息
+ if($route.query.AppealEstablished){
+ CompleteDisabling.value=false;//可以编辑完结信息
+ }
+
+ // 是否可以编辑处理结果
+ if($route.query.Resultediting){
+ ProcessingProhibited.value=false;//可以编辑处理结果
+ }else{
+ ProcessingProhibited.value=true;//可以编辑处理结果
+ }
console.log(RouterState.value, '路由状态');
+ console.log(ProcessingresultsState.value,'当前状态');
getDictionaryBiz('result_handling').then(res => {
console.log(res, '发现环节');
ProcessingResults.value = res.data.data;
@@ -1506,6 +1544,9 @@ const changeProcessingResults = val => {
// 支付方式选择
const PaymentSelection = val => {
+ if(ProcessingProhibited.value){
+ return
+ }
console.log(val, '支付');
console.log(Paymentmethod.value);
if (val.payment) {
@@ -1545,7 +1586,7 @@ const PaymentConfirmation = val => {
// 添加赔款方
const AddCompensation = () => {
- if (ProcessingresultsState.value) {
+ if (CompleteDisabling.value) {
// 表示此刻为理赔编辑状态,只能操作处理结果
return;
}
@@ -1560,7 +1601,7 @@ const AddCompensation = () => {
};
// 添加受款方
const AddPayee = () => {
- if (ProcessingresultsState.value) {
+ if (CompleteDisabling.value) {
// 表示此刻为理赔编辑状态,只能操作处理结果
return;
}
@@ -1597,7 +1638,7 @@ const amountMoney = () => {
};
// 移除按钮
const payremove = (state, val, data) => {
- if (ProcessingresultsState.value) {
+ if (CompleteDisabling.value) {
// 表示此刻为理赔编辑状态,只能操作处理结果
return;
}
@@ -1979,10 +2020,10 @@ const ConfirmForm = () => {
});
};
-// 客服仲裁完结
-const Arbitrationcompleted = () => {
- // 申诉下面的编辑完结信息
- if ($route.query.Appealeditor == 'appeal' && $route.query.AppealEstablished) {
+// 申诉成立编辑
+const AppealEditor =()=>{
+ // 申诉下面的编辑完结信息
+ if ($route.query.AppealEstablished) {
editloading.value = true; //开启加载效果
let data = {
completionRecipientEntities: [], //处理结果受款方
@@ -2062,10 +2103,10 @@ const Arbitrationcompleted = () => {
console.log('申诉下面编辑完结信息');
return;
}
+}
- console.log(Copyprocessingresults.value, '初始化处理结果参数');
- console.log(ProcessingList.value, '最新的处理结果参数');
-
+// 理赔金未出编辑
+const UnpaidClaimsEdited=()=>{
if (ProcessingresultsState.value) {
// 理赔金额未出编辑
// 处理结果编辑
@@ -2167,82 +2208,9 @@ const Arbitrationcompleted = () => {
console.log('理赔金额未出编辑');
return;
}
-
- // 申诉只修改完结信息
- if (Appealeditor.value == 'appeal') {
- // 表示当前是申诉状态,只修改完结信息
- let data = {
- completionRecipientEntities: [], //处理结果受款方
- completionRecordEntities: [], //处理结果赔款方
- typesOf: '1', //申诉完结编辑新增标识
- reasonArbitration: Indexform.value.arbitrate, //仲裁原因
- appealId: $route.query.appealID,
- id: $route.query.id,
- workOrderId: $route.query.id, //异常工单ID(这里是workOrderId)
- };
-
- data['completionRecordEntities'] = CompensationParty.value
- .filter(item => item.state === 0) // 先筛选出状态为 0 的项
- .map(item => {
- return {
- indemnitor: item.name, // 赔款方
- reason: item.reason, // 原因
- money: Number(item.num), // 金额
- reasonArbitration: Indexform.value.arbitrate, //仲裁原因
- workOrderId: $route.query.id, // 异常工单
- warehouseId: item.warehouseId, //仓库ID
- compensationPersonnel: item.personResponsibleList, //责任人
- explains: item.reason, //说明(页面不展示)
- id: $route.query.id,
- };
- });
- data['completionRecipientEntities'] = CompensationParty.value
- .filter(item => item.state === 1) // 先筛选出状态为 1 的项
- .map(item => {
- return {
- recipient: item.name, // 受款方
- reasonReceivingPayment: item.reason, // 原因
- money: Number(item.num), // 金额
- workOrderNumber: $route.query.workOrderNumber, // 工单号
- responsibleParty: FangAddList.value
- .map(aItem =>
- warehouseData.value
- .filter(bItem => bItem.value === aItem.businessName)
- .map(match => match.label)
- .join(',')
- )
- .join(','),
- warehouseId: $route.query.warehouseId == '/' ? '' : $route.query.warehouseId, // 仓库ID
- workOrderId: $route.query.id, //异常工单
- id: $route.query.id,
- };
- });
- console.log(data, '处理好的值');
- editloading.value = true; //开启加载效果
- $_updateCompletionEnd(data)
- .then(res => {
- console.log(res, '完结编辑');
- if (res.data.code == 200) {
- ElMessage({
- message: res.data.msg,
- type: 'success',
- });
- $store.commit('DEL_TAG_CURRENT'); //关闭当前页面
- $router.push({
- //跳转到首页
- path: '/aftersales/aftersalesWorkOrder',
- });
- editloading.value = false; //关闭加载效果
- }
- })
- .catch(res => {
- editloading.value = false; //关闭加载效果
- });
- console.log('申诉完结信息编辑');
- return;
- // 下面不执行
- }
-
+}
+ // 客服仲裁完结
+const Arbitrationcompleted=()=>{
let data = {
id: $route.query.id,
completionRecipientEntities: [], //处理结果受款方
@@ -2335,7 +2303,272 @@ const Arbitrationcompleted = () => {
AddressClosed('/aftersales/aftersalesWorkOrdermodify'); ///删除当前页面
}
});
-};
+}
+
+// const Arbitrationcompleted = () => {
+// // 申诉成立编辑
+// if ($route.query.Appealeditor == 'appeal' && $route.query.AppealEstablished) {
+// editloading.value = true; //开启加载效果
+// let data = {
+// completionRecipientEntities: [], //处理结果受款方
+// completionRecordEntities: [], //处理结果赔款方
+// reasonArbitration: Indexform.value.arbitrate, //仲裁原因
+// id: $route.query.id,
+// appealId: $route.query.appealID, //申诉ID
+// typesOf: '1', //申诉完结编辑新增标识
+// workOrderId: $route.query.id, //异常工单ID(这里是workOrderId)
+// };
+// if (UncompletionRecordEntitiesDat.value.length) {
+// // 删除的赔款方
+// data['assignListRecord'] = UncompletionRecordEntitiesDat.value.map(res => res.id);
+// }
+// if (UncompletionRecipientEntityListData.value.length) {
+// // 受款方
+// data['assignListRecipient'] = UncompletionRecipientEntityListData.value.map(res => res.id);
+// }
+
+// data['completionRecordEntities'] = CompensationParty.value
+// .filter(item => item.state === 0) // 先筛选出状态为 0 的项
+// .map(item => {
+// return {
+// // indemnitor: item.name, // 赔款方
+// reason: item.reason, // 原因
+// money: Number(item.num), // 金额
+// reasonArbitration: Indexform.value.arbitrate, //仲裁原因
+// workOrderId: $route.query.id, // 异常工单
+// warehouseId: item.warehouseId, //仓库ID
+// compensationPersonnel: item.personResponsibleList, //责任人
+// explains: item.reason, //说明(页面不展示)
+// id: item.id, // 赔款方ID
+// };
+// });
+// data['completionRecipientEntities'] = CompensationParty.value
+// .filter(item => item.state === 1) // 先筛选出状态为 1 的项
+// .map(item => {
+// return {
+// // recipient: item.name, // 受款方
+// reasonReceivingPayment: item.reason, // 原因
+// money: Number(item.num), // 金额
+// workOrderNumber: $route.query.workOrderNumber, // 工单号
+// responsibleParty: FangAddList.value
+// .map(aItem =>
+// warehouseData.value
+// .filter(bItem => bItem.value === aItem.businessName)
+// .map(match => match.label)
+// .join(',')
+// )
+// .join(','),
+// warehouseId: item.warehouseId, //仓库ID
+// workOrderId: $route.query.id, //异常工单
+// id: item.id,
+// };
+// });
+// console.log(data, '处理好的值');
+// $_updateCompletionEnd(data)
+// .then(res => {
+// console.log(res, '完结成功');
+// console.log(res, '完结编辑');
+// editloading.value = false; //关闭加载效果
+// if (res.data.code == 200) {
+// ElMessage({
+// message: res.data.msg,
+// type: 'success',
+// });
+// $store.commit('DEL_TAG_CURRENT'); //关闭当前页面
+// $router.push({
+// //跳转到首页
+// path: '/aftersales/aftersalesWorkOrder',
+// });
+// }
+// })
+// .catch(res => {
+// editloading.value = false; //关闭加载效果
+// });
+// console.log('申诉下面编辑完结信息');
+// return;
+// }
+
+// console.log(Copyprocessingresults.value, '初始化处理结果参数');
+// console.log(ProcessingList.value, '最新的处理结果参数');
+
+// if (ProcessingresultsState.value) {
+// // 理赔金额未出编辑
+// // 处理结果编辑
+// let data = {
+// id: $route.query.id,
+// resultIdentification: 2, //编辑提交标识
+// // workOrderId: $route.query.id, //异常工单ID
+// resultDescription: Indexform.value.resultDescription, //处理结果说明
+// aftersalesProcessingResultsDTO: {
+// resultDescription: Indexform.value.resultDescription, //处理结果说明
+// id: $route.query.Processed ? ProcessedId.value : $route.query.subId,
+// // $route.query.Processed?
+// // ProcessedId.value
+// },
+// };
+// // 查找被删除的
+// if( Copyprocessingresults.value){
+// let missingObjects = Copyprocessingresults.value.filter(objA => {
+// let matchingObjects = ProcessingList.value.filter(
+// objB => objB.state === objA.state && objB.id === objA.id
+// );
+// return matchingObjects.length === 0;
+// });
+// if (missingObjects.length) {
+// console.log(missingObjects);
+// data.aftersalesProcessingResultsDTO['assignList'] = missingObjects.map(item => item.id);
+// }
+// }
+
+
+
+// data.aftersalesProcessingResultsDTO['processingMoneyEntityList'] = ProcessingList.value
+// .map(item => {
+// console.log(item);
+// let match = ProcessingResults.value.find(element => element.dictValue == item.name);
+// if (match) {
+// let paymentMethodMatch = Paymentmethod.value.find(
+// paymentMethod => paymentMethod.dictKey == item.payment
+// );
+// return {
+// resultType: match.dictKey, //赔方式的key
+// money: item.input, //金额
+// typesOf: 1, //固定参数
+// compensationMethod: paymentMethodMatch ? paymentMethodMatch.dictKey : '',
+// compensationMethodName: paymentMethodMatch ? paymentMethodMatch.dictValue : '',
+// resultName: item.name, //处理结果名字
+// paymentUnit: item.paymentUnit, //支付单位
+// id: item.id, //id
+// compensationTime: item.compensationTime, //时间
+// };
+// } else {
+// return null;
+// }
+// })
+// .filter(item => item !== null);
+
+// // 总金额
+// // let sum = 0; //金额总计
+// // for (let i = 0; i < ProcessingList.value.length; i++) {
+// // sum = computeNumber(sum, '+', ProcessingList.value[i].input).result;
+// // }
+// // data.aftersalesProcessingResultsDTO.money = sum; //金额汇总
+
+// let TotalAmount = 0; //总金额
+// ProcessingList.value.forEach(res => {
+// console.log(res);
+// TotalAmount += Number(res.input);
+// });
+// console.log(TotalAmount, '总金额');
+// data.aftersalesProcessingResultsDTO.money = TotalAmount; //金额汇总
+
+// data.aftersalesProcessingResultsDTO['resultType'] = ProcessingList.value
+// .map(item => item.name)
+// .join(','); //处理结果说明文字拼接
+// data.aftersalesProcessingResultsDTO['compensationMethod'] = ProcessingList.value
+// .map(item => item.text)
+// .join(',');
+// console.log(data, '编辑后的数据');
+// $_addProcessingResults(data)
+// .then(res => {
+// console.log(res, '理赔编辑成功返回值');
+// ElMessage({
+// message: res.data.msg,
+// type: 'success',
+// });
+// if (res.data.code == 200) {
+// $router.push({
+// path: '/aftersales/aftersalesWorkOrder',
+// });
+// AddressClosed('/aftersales/aftersalesWorkOrdermodify'); //关闭当前页面
+// }
+// })
+// .catch(error => {
+// ElMessage({
+// message: res.data.msg,
+// type: 'success',
+// });
+// });
+// console.log('理赔金额未出编辑');
+// return;
+// }
+
+// // // 申诉只修改完结信息
+// // if (Appealeditor.value == 'appeal') {
+// // // 表示当前是申诉状态,只修改完结信息
+// // let data = {
+// // completionRecipientEntities: [], //处理结果受款方
+// // completionRecordEntities: [], //处理结果赔款方
+// // typesOf: '1', //申诉完结编辑新增标识
+// // reasonArbitration: Indexform.value.arbitrate, //仲裁原因
+// // appealId: $route.query.appealID,
+// // id: $route.query.id,
+// // workOrderId: $route.query.id, //异常工单ID(这里是workOrderId)
+// // };
+
+// // data['completionRecordEntities'] = CompensationParty.value
+// // .filter(item => item.state === 0) // 先筛选出状态为 0 的项
+// // .map(item => {
+// // return {
+// // indemnitor: item.name, // 赔款方
+// // reason: item.reason, // 原因
+// // money: Number(item.num), // 金额
+// // reasonArbitration: Indexform.value.arbitrate, //仲裁原因
+// // workOrderId: $route.query.id, // 异常工单
+// // warehouseId: item.warehouseId, //仓库ID
+// // compensationPersonnel: item.personResponsibleList, //责任人
+// // explains: item.reason, //说明(页面不展示)
+// // id: $route.query.id,
+// // };
+// // });
+// // data['completionRecipientEntities'] = CompensationParty.value
+// // .filter(item => item.state === 1) // 先筛选出状态为 1 的项
+// // .map(item => {
+// // return {
+// // recipient: item.name, // 受款方
+// // reasonReceivingPayment: item.reason, // 原因
+// // money: Number(item.num), // 金额
+// // workOrderNumber: $route.query.workOrderNumber, // 工单号
+// // responsibleParty: FangAddList.value
+// // .map(aItem =>
+// // warehouseData.value
+// // .filter(bItem => bItem.value === aItem.businessName)
+// // .map(match => match.label)
+// // .join(',')
+// // )
+// // .join(','),
+// // warehouseId: $route.query.warehouseId == '/' ? '' : $route.query.warehouseId, // 仓库ID
+// // workOrderId: $route.query.id, //异常工单
+// // id: $route.query.id,
+// // };
+// // });
+// // console.log(data, '处理好的值');
+// // editloading.value = true; //开启加载效果
+// // $_updateCompletionEnd(data)
+// // .then(res => {
+// // console.log(res, '完结编辑');
+// // if (res.data.code == 200) {
+// // ElMessage({
+// // message: res.data.msg,
+// // type: 'success',
+// // });
+// // $store.commit('DEL_TAG_CURRENT'); //关闭当前页面
+// // $router.push({
+// // //跳转到首页
+// // path: '/aftersales/aftersalesWorkOrder',
+// // });
+// // editloading.value = false; //关闭加载效果
+// // }
+// // })
+// // .catch(res => {
+// // editloading.value = false; //关闭加载效果
+// // });
+// // console.log('申诉完结信息编辑');
+// // return;
+// // // 下面不执行
+// // }
+
+// };
// 少货件数对应事件
const ShortageTtems = val => {
diff --git a/src/views/supervise/management.vue b/src/views/supervise/management.vue
index 8cbd9276..1fd17cdf 100644
--- a/src/views/supervise/management.vue
+++ b/src/views/supervise/management.vue
@@ -120,6 +120,18 @@
label-width="120px"
ref="ruleFormRef"
>
+
+
+
+
{
+ let dataSub = { parentId };
+ return $_parentId(dataSub).then(Rs => {
+ const children = Rs.data.data.map(item => ({
+ value: item.value,
+ label: item.title,
+ id: item.id,
+ key: item.key,
+ hasChildren: item.hasChildren, // 假定hasChildren是一个布尔值
+ children: [],
+ }));
+
+ function findAndReplace(target, value) {
+ for (let i = 0; i < target.length; i++) {
+ if (target[i].value === value) {
+ target[i].children = children;
+ break;
+ }
+ if (target[i].children && target[i].children.length > 0) {
+ findAndReplace(target[i].children, value);
+ }
+ }
+ }
+
+ findAndReplace(targetList, indicatorValue); // 查找并替换targetList的正确位置
+
+ const childRequests = children
+ .filter(child => child.hasChildren)
+ .map(child => loadChildren(targetList, child.id, child.value)); // 使用完整的targetList进行递归
+
+ // 等待所有子分类都加载完毕
+ return Promise.all(childRequests);
+ });
+};
+
+// 当分类项被点击时调用
+const classification = (val, index) => {
+ console.log(index, '当前点击的谁');
+ console.log(val,'val222');
+ const currentCategory = AssessmentDepartment.value.find(category => category.value === index);
+ if (currentCategory) {
+ if (currentCategory.hasChildren && currentCategory.children.length === 0) {
+ // 当前分类有子分类并且尚未加载子分类,触发加载子分类的操作
+ console.log('当前点击的是有子分类但未加载的父分类');
+ loadChildren(AssessmentDepartment.value, val, index);
+ } else {
+ // 当前分类已经加载子分类或者没有子分类,无需进一步操作
+ console.log('当前点击的分类没有子分类或子分类已加载');
+ }
+ } else {
+ console.log('分类不存在于当前的分类列表中');
+ }
+};
+
+
+// 初始时获取顶级分类
+const loadInitialCategories = (val = 0) => {
+ let dataSub = { parentId: val };
+ $_parentId(dataSub).then(res => {
+ console.log(res, '初始化顶级分类-------');
+ res.data.data.forEach(item => {
+ setTimeout(()=>{
+ classification(item.id,item.value)
+ },0)
+ department.value = item.id;
+ AssessmentDepartment.value.push({
+ value: item.value,
+ label: item.title,
+ id: item.id,
+ key: item.key,
+ hasChildren: item.hasChildren,
+ children: [], // 初始化子分类列表
+ });
+ });
+ });
+};
+loadInitialCategories();
+
+
+
+const handleNodeClick = (data, node, component) => {
+ // 'data' 是点击的节点数据
+ // 'node' 是 Node 对象
+ // 'component' 是组件的引用
+ // console.log('You clicked:', data);
+ department.value = data; //存储当前点击的考核部门
+ console.log(department.value, '当前点击的考核部门');
+ console.log(data.id,'data.id');
+ console.log(data.value,'data.value');
+ if (data.hasChildren) {
+ classification(data.id, data.value);
+ }
+
+ // 根据你的需求处理点击事件
+};
+
/** 必填 */
const rules = ref({
/** 发站仓名称 */
@@ -374,6 +490,7 @@ const ClassificationDditing = val => {
lassificationform.value.classificationoptionsvalue = data.pid; //分类
lassificationform.value.name = data.name; //分类名称
lassificationform.value.description = data.description; //分类描述
+ lassificationform.value.examineDeptId = data.examineDeptId; //审核部门ID
// 积分管理回显
data.pointsEntities.forEach(res => {
PointsList.value.push({ integral: res.point });
@@ -467,8 +584,10 @@ const newlyAddedFn = formEl => {
description: lassificationform.value.description, //分类描述
pid: lassificationform.value.classificationoptionsvalue, //分类ID
pointsEntities: [], //积分
+ examineDeptId: lassificationform.value.examineDeptId, //考核部门ID
+ examineDeptName: department.value.label ? department.value.label : '', //考核部门名称
};
-
+ console.log(AssessmentDepartment.value, '部门');
let content = '';
for (const iterator of PointsList.value) {
// 检测是否为数字