修改载物订单

This commit is contained in:
hr121 2025-08-18 19:15:37 +08:00
parent 34e2fa8cdb
commit a38f359415

View File

@ -125,9 +125,9 @@ import { allCustomer } from "@/api/system/customer";
import { get } from "@/api/system/dictDetail";
import { getList } from "@/api/system/pilot";
import { getOrderDetail } from "@/api/order";
import { getUser } from "@/api/system/user";
// import { getUser } from "@/api/system/user";
import { getOrderStatusText, getSettlementStatusText, getOrderStatusClass, getSettlementStatusClass } from "@/utils/orderStatus";
import store from "@/store";
// import store from "@/store";
export default {
name: "loadOrder",
@ -242,19 +242,19 @@ export default {
try {
let res = [];
//
const userRes = await getUser({ id: store.getters.user.id });
if (userRes && userRes.content && userRes.content.length > 0) {
const userInfo = userRes.content[0];
if (userInfo.roles && userInfo.roles.length > 0) {
this.userRole = userInfo.roles[0].name;
//
if (this.userRole === "区域负责人") {
res = await allScenic({areaId: userInfo.areaId});
} else if (this.userRole === "管理员" || this.userRole === "财务") {
// const userRes = await getUser({ id: store.getters.user.id });
// if (userRes && userRes.content && userRes.content.length > 0) {
// const userInfo = userRes.content[0];
// if (userInfo.roles && userInfo.roles.length > 0) {
// this.userRole = userInfo.roles[0].name;
// //
// if (this.userRole === "") {
// res = await allScenic({areaId: userInfo.areaId});
// } else if (this.userRole === "" || this.userRole === "") {
res = await allScenic();
}
}
}
// }
// }
// }
//
if (res && Array.isArray(res)) {
this.scenicOptions = res.map((scenic) => ({