|
@@ -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;
|
|
|
});
|