Parcourir la source

物资信息管理 内容调整

Hwf il y a 8 mois
Parent
commit
76fb141109

+ 4 - 0
src/types/components.d.ts

@@ -25,6 +25,7 @@ declare module 'vue' {
     ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
     ElBadge: typeof import('element-plus/es')['ElBadge']
     ElButton: typeof import('element-plus/es')['ElButton']
+    ElCard: typeof import('element-plus/es')['ElCard']
     ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
     ElCol: typeof import('element-plus/es')['ElCol']
     ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
@@ -42,6 +43,7 @@ declare module 'vue' {
     ElIcon: typeof import('element-plus/es')['ElIcon']
     ElImage: typeof import('element-plus/es')['ElImage']
     ElInput: typeof import('element-plus/es')['ElInput']
+    ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
     ElMenu: typeof import('element-plus/es')['ElMenu']
     ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
     ElOption: typeof import('element-plus/es')['ElOption']
@@ -55,6 +57,8 @@ declare module 'vue' {
     ElSlider: typeof import('element-plus/es')['ElSlider']
     ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
     ElSwitch: typeof import('element-plus/es')['ElSwitch']
+    ElTable: typeof import('element-plus/es')['ElTable']
+    ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
     ElTag: typeof import('element-plus/es')['ElTag']
     ElText: typeof import('element-plus/es')['ElText']
     ElTimeline: typeof import('element-plus/es')['ElTimeline']

+ 1 - 1
src/views/comprehensiveGuarantee/MaterialReserveManagement/MaterialStatistics.vue

@@ -53,7 +53,7 @@
 </template>
 <script lang="ts" setup>
 import { graphic } from 'echarts';
-import { getCountDate, getMaterialDate, getMaterialList } from '@/api/comprehensiveGuarantee/MaterialReserveManagement/MaterialStatistics';
+import { getCountDate, getMaterialDate, getMaterialList } from '@/api/comprehensiveGuarantee/materialReserveManagement/MaterialStatistics';
 let totalData = ref({
   'warehouseNum': '',
   'goodsNum': ''

+ 7 - 8
src/views/comprehensiveGuarantee/MaterialReserveManagement/addMaterialInformation.vue

@@ -75,7 +75,9 @@
             </el-col>
             <el-col :span="12">
               <el-form-item label="分类名称:" prop="category_name">
-                <el-input v-model="form.category_name" placeholder="请输入分类名称" />
+                <el-select v-model="form.category_name" placeholder="请选择分类名称">
+                  <el-option v-for="(item, index) in material_classification" :key="index" :label="item.label" :value="item.value" />
+                </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="12">
@@ -86,7 +88,7 @@
             <el-col :span="12">
               <el-form-item label="物资类型:" prop="material_type_id">
                 <el-select v-model="form.material_type_id" placeholder="请选择物资类型">
-                  <el-option v-for="(item, index) in materialTypeList" :key="index" :label="item.material_category_name" :value="item.id" />
+                  <el-option v-for="(item, index) in material_type" :key="index" :label="item.label" :value="item.value" />
                 </el-select>
               </el-form-item>
             </el-col>
@@ -229,12 +231,11 @@
 </template>
 <script setup lang="ts">
 import { getMaterialWarehouseList } from '@/api/comprehensiveGuarantee/materialReserveManagement/godownManagement';
-import { getMaterialTypeList } from '@/api/comprehensiveGuarantee/materialReserveManagement/typesMaterialsManagement';
 import { getMaterialWarehouseRootList } from '@/api/comprehensiveGuarantee/materialReserveManagement/warehouseManagement';
 import { createMaterial, getMaterialInfo, updateMaterial } from '@/api/comprehensiveGuarantee/materialReserveManagement/materialInformation';
 
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
-const { disaster_type, material_source } = toRefs<any>(proxy?.useDict('disaster_type', 'material_source'));
+const { disaster_type, material_source, material_classification, material_type } = toRefs<any>(proxy?.useDict('disaster_type', 'material_source', 'material_classification', 'material_type'));
 const emits = defineEmits(['close']);
 const buttonLoading = ref(false);
 const props = defineProps({
@@ -326,7 +327,6 @@ const data = reactive({
 
 const { form, rules } = toRefs(data);
 let godownList = ref([]);
-let materialTypeList = ref([]);
 let materialWarehouseRootList = ref([]);
 const closeDialog = () => {
   emits('close');
@@ -346,6 +346,8 @@ const submitForm = async (formEl) => {
           emits('close', true);
         });
       }
+    } else {
+      proxy.$modal.msgError('表单校验失败');
     }
   });
 };
@@ -354,9 +356,6 @@ onMounted(() => {
   getMaterialWarehouseRootList().then((res) => {
     materialWarehouseRootList.value = res.data;
   });
-  getMaterialTypeList().then((res) => {
-    materialTypeList.value = res.data;
-  });
   getMaterialWarehouseList().then((res) => {
     godownList.value = res.data;
   });