From 37436ffec6f763d6d298d6f42d1ff946f27c71be Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 03 六月 2025 13:53:47 +0800
Subject: [PATCH] 表格不要删除按钮,统一用上面的
---
src/views/procureMent/components/ProductionDialog.vue | 110 +------------------------------------------------------
1 files changed, 2 insertions(+), 108 deletions(-)
diff --git a/src/views/procureMent/components/ProductionDialog.vue b/src/views/procureMent/components/ProductionDialog.vue
index 3da88f5..1de700b 100644
--- a/src/views/procureMent/components/ProductionDialog.vue
+++ b/src/views/procureMent/components/ProductionDialog.vue
@@ -111,9 +111,6 @@
const handleClose = () => {
dialogVisible.value = false;
console.log(form.value);
- // formRef.value?.resetFields()
- // Object.assign(form, {
- // })
};
const handleReset = () => {
if (!formRef.value) return;
@@ -146,108 +143,5 @@
};
</script>
-<style lang="less" scoped>
-</style>
-
-<!-- <template>
- <el-dialog
- v-model="dialogFormVisible"
- title="閲囪喘鐧昏鏂板"
- width="500px"
- :close-on-click-modal="false"
- @close="handleClose"
- >
-
- </el-dialog>
-</template>
-
-<script setup>
-import { ref, reactive, defineProps, defineEmits } from 'vue'
-import { ElMessage } from 'element-plus'
-
-const props = defineProps({
- visible: {
- type: Boolean,
- default: false
- }
-})
-
-const emit = defineEmits(['update:visible', 'success'])
-
-const dialogFormVisible = ref(false)
-const formRef = ref(null)
-
-// 琛ㄥ崟鏁版嵁
-const form = reactive({
- supplierName: '',
- category: '',
- unit: '',
- purchaseAmount: '',
- priceBeforeTax: '',
- totalBeforeTax: '',
- calorificValue: '',
- registrant: '',
- registrationDate: ''
-})
-
-// 琛ㄥ崟楠岃瘉瑙勫垯
-
-
-// 鐩戝惉visible鍙樺寲
-watch(() => props.visible, (val) => {
- dialogFormVisible.value = val
-})
-
-// 鐩戝惉dialogFormVisible鍙樺寲
-watch(() => dialogFormVisible.value, (val) => {
- emit('update:visible', val)
-})
-
-// 鎻愪氦琛ㄥ崟
-const handleSubmit = async () => {
- if (!formRef.value) return
-
- await formRef.value.validate((valid) => {
- if (valid) {
- try {
- emit('success', { ...form })
- handleClose()
- ElMessage.success('淇濆瓨鎴愬姛')
- } catch (error) {
- console.error('淇濆瓨澶辫触:', error)
- ElMessage.error('淇濆瓨澶辫触')
- }
- }
- })
-}
-
-// 鍙栨秷
-const handleCancel = () => {
- handleClose()
-}
-</script>
-
-<style scoped>
-.production-form {
- padding: 20px;
-}
-
-.dialog-footer {
- display: flex;
- justify-content: center;
- gap: 20px;
-}
-
-:deep(.el-form-item__label) {
- font-weight: normal;
-}
-
-:deep(.el-input),
-:deep(.el-date-picker) {
- width: 100%;
-}
-
-:deep(.el-dialog__body) {
- padding-top: 10px;
-}
-</style> -->
\ No newline at end of file
+<style lang="sass" scoped>
+</style>
\ No newline at end of file
--
Gitblit v1.9.3