diff --git a/src/layout/components/Aside.vue b/src/layout/components/Aside.vue index b9e550c..cf0d9f8 100644 --- a/src/layout/components/Aside.vue +++ b/src/layout/components/Aside.vue @@ -12,7 +12,7 @@
- 泠珑水阁管理系统 + 匠承非遗管理系统
@@ -106,7 +106,7 @@ - 服装等级管理 + 服装类别管理 diff --git a/src/views/CostumeAppointments/AddCostumes.vue b/src/views/CostumeAppointments/AddCostumes.vue index 893ee2e..97548f6 100644 --- a/src/views/CostumeAppointments/AddCostumes.vue +++ b/src/views/CostumeAppointments/AddCostumes.vue @@ -35,20 +35,25 @@ - + - + - - + + + + - + 提交 + + 重置 + @@ -58,7 +63,7 @@ import {Plus} from "@element-plus/icons-vue"; import {ElMessage, genFileId, type UploadProps, type UploadRawFile} from "element-plus"; import myAxios from "@/api/myAxios"; -import {inject, ref} from "vue"; +import {inject, ref ,onMounted} from "vue"; const fileSimple = ref() const uploadProductImg : any = ref() const uploadProductDetail : any = ref() @@ -70,6 +75,53 @@ const form = ref({ price:'', clothesType:'' }) +const clothesType: any = ref([ + { + values: '', + label: '' + } +]) +onMounted(()=>{ + getGrade() +}) +const getGrade = async ()=>{ + const res = await myAxios.post('/clothesGrade/list',{}) + for(let i in res.data.data){ + clothesType.value[i] = { + values: res.data.data[i].clothesType, + label:res.data.data[i].clothesType, + } + } +} +const loadForm = (value: any) => { + form.value.clothesType = value +} +const reload : any = inject("reload") +const onSubmit = async () => { + const values = Object.values(form.value); + if (values.some(value => value === null || value === undefined || value === '')) { + ElMessage({ + type:'warning', + message:'请检查表单数据是否完整填写' + }) + return; + } + const res = await myAxios.post('/clothesInfo/add', { ...form.value }) + if (res.data.code === 1) { + ElMessage({ + type: 'success', + message: "提交成功" + }) + reload() //上传完后重置表单 + } else { + ElMessage.error("服务错误") + return; + } +} +const resetFormData = ref() +const resetForm = () =>{ + resetFormData.value.resetFields() +} const handleRemove: UploadProps['onRemove'] = (uploadFile, uploadFiles) => { console.log(uploadFile, uploadFiles) } @@ -104,29 +156,6 @@ const Exceed_ProductDetail: UploadProps['onExceed'] = (files) => { //覆盖商 file.uid = genFileId() uploadProductDetail.value!.handleStart(file) } -const reload : any = inject("reload") -const onSubmit = async () => { - const values = Object.values(form.value); - // 使用some()方法来检查是否有任何值为空 - if (values.some(value => value === null || value === undefined || value === '')) { - ElMessage({ - type:'warning', - message:'请检查表单数据是否完整填写' - }) - return; - } - const res = await myAxios.post('/clothesInfo/add', { ...form.value }) - if (res.data.code === 1) { - ElMessage({ - type: 'success', - message: "提交成功" - }) - reload() //上传完后重置表单 - } else { - ElMessage.error("服务错误") - return; - } -} diff --git a/src/views/CostumeAppointments/AppointmentOrder.vue b/src/views/CostumeAppointments/AppointmentOrder.vue index 1f9fc1e..a36eef1 100644 --- a/src/views/CostumeAppointments/AppointmentOrder.vue +++ b/src/views/CostumeAppointments/AppointmentOrder.vue @@ -43,6 +43,13 @@ + + + + @@ -93,17 +100,13 @@ diff --git a/src/views/CostumeAppointments/ClothingGrade.vue b/src/views/CostumeAppointments/ClothingGrade.vue index 5d062f3..69ffe6a 100644 --- a/src/views/CostumeAppointments/ClothingGrade.vue +++ b/src/views/CostumeAppointments/ClothingGrade.vue @@ -14,8 +14,8 @@ - - + +