diff --git a/src/views/mes/baseMaterialInfo/index.vue b/src/views/mes/baseMaterialInfo/index.vue
index 557829d..d7821eb 100644
--- a/src/views/mes/baseMaterialInfo/index.vue
+++ b/src/views/mes/baseMaterialInfo/index.vue
@@ -604,19 +604,43 @@
-
+
+
+
+
-
+
+
+
+
-
+
+
+
+
-
+
+
+
+
-
+
+
+
+
@@ -629,27 +653,49 @@
-
-
+
+
天
-
+
小时
-
+
分钟
-
-
+
+
天
-
+
小时
-
+
分钟
@@ -701,6 +747,7 @@ import { getFactoryList } from "@/api/mes/baseFactoryInfo";
import {getBaseMeasurementUnitInfoList} from "@/api/mes/baseMeasurementUnitInfo";
import {BaseMeasurementUnitInfoVO} from "@/api/mes/baseMeasurementUnitInfo/types";
import { getBaseMaterialTypeList } from "@/api/mes/baseMaterialType";
+import {getSysMasterDataDetailList} from "@/api/system/masterDataDetail";
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const { apply_flag, inner_tube_flag,
@@ -976,6 +1023,13 @@ const handleSelectionChange = (selection: BaseMaterialInfoVO[]) => {
const handleAdd = () => {
reset();
getFactorySelect();
+
+ getbrandList();
+ getplyratingList();
+ getpatternList();
+ getspeedLevelList();
+ getloadList();
+
getMeasureUnit();
getMaterialType();
dialog.visible = true;
@@ -986,6 +1040,13 @@ const handleAdd = () => {
const handleUpdate = async (row?: BaseMaterialInfoVO) => {
reset();
getFactorySelect();
+
+ getbrandList();
+ getplyratingList();
+ getpatternList();
+ getspeedLevelList();
+ getloadList();
+
getMeasureUnit();
getMaterialType();
const _materialId = row?.materialId || ids.value[0]
@@ -1132,25 +1193,59 @@ const convertToSeconds = () => {
/** 秒转换为天小时分钟 */
const convertToTime = () => {
- const maxTotalSeconds = form.value.maxParkingTime;
- const maxDays = Math.floor(totalSeconds / (24 * 60 * 60));
- const maxHours = Math.floor((totalSeconds % (24 * 60 * 60)) / 3600);
- const maxMinutes = Math.floor((totalSeconds % 3600) / 60);
+ // 处理最大停放时间
+ const maxTotalSeconds = form.value.maxParkingTime || 0;
+ const maxDays = Math.floor(maxTotalSeconds / (24 * 60 * 60));
+ const maxHours = Math.floor((maxTotalSeconds % (24 * 60 * 60)) / 3600);
+ const maxMinutes = Math.floor((maxTotalSeconds % 3600) / 60);
// 更新到表单中
form.value.maxParkingDays = maxDays;
form.value.maxParkingHours = maxHours;
form.value.maxParkingMinutes = maxMinutes;
-
- const minTotalSeconds = form.value.minParkingTime;
- const minDays = Math.floor(totalSeconds / (24 * 60 * 60));
- const minHours = Math.floor((totalSeconds % (24 * 60 * 60)) / 3600);
- const minMinutes = Math.floor((totalSeconds % 3600) / 60);
+ // 处理最小停放时间
+ const minTotalSeconds = form.value.minParkingTime || 0;
+ const minDays = Math.floor(minTotalSeconds / (24 * 60 * 60));
+ const minHours = Math.floor((minTotalSeconds % (24 * 60 * 60)) / 3600);
+ const minMinutes = Math.floor((minTotalSeconds % 3600) / 60);
form.value.minParkingDays = minDays;
form.value.minParkingHours = minHours;
form.value.minParkingMinutes = minMinutes;
}
+/*brand、plyrating、pattern、speed_level、load*/
+//获取品牌列表
+let brandList = ref([]);
+const getbrandList = async () => {
+ const res = await getSysMasterDataDetailList({masterDataId: 1});
+ brandList.value = res.data;
+};
+//获取层级列表
+let plyratingList = ref([]);
+const getplyratingList = async () => {
+ const res = await getSysMasterDataDetailList({masterDataId: 4});
+ plyratingList.value = res.data;
+};
+//获取花纹列表
+let patternList = ref([]);
+const getpatternList = async () => {
+ const res = await getSysMasterDataDetailList({masterDataId: 5});
+ patternList.value = res.data;
+};
+//获取速度等级列表
+
+let speedLevelList = ref([]);
+const getspeedLevelList = async () => {
+ const res = await getSysMasterDataDetailList({masterDataId: 7});
+ speedLevelList.value = res.data;
+};
+//获取负荷载重列表
+let loadList = ref([]);
+const getloadList = async () => {
+ const res = await getSysMasterDataDetailList({masterDataId: 6});
+ loadList.value = res.data;
+};
+
onMounted(() => {