From 4008c7e22c9c01eb653b04f934990486df622654 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期一, 14 七月 2025 12:21:35 +0800
Subject: [PATCH] Merge branch 'master' of http://47.108.235.38:8080/r/FZCZTB

---
 Web/src/views/ADPenalty/aDPenalty/component/editDialog.vue |  122 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 122 insertions(+), 0 deletions(-)

diff --git a/Web/src/views/ADPenalty/aDPenalty/component/editDialog.vue b/Web/src/views/ADPenalty/aDPenalty/component/editDialog.vue
new file mode 100644
index 0000000..a2ba6f6
--- /dev/null
+++ b/Web/src/views/ADPenalty/aDPenalty/component/editDialog.vue
@@ -0,0 +1,122 @@
+锘�<script lang="ts" name="aDPenalty" setup>
+import { ref, reactive, onMounted } from "vue";
+import { ElMessage } from "element-plus";
+import type { FormRules } from "element-plus";
+import { formatDate } from '/@/utils/formatTime';
+import { useADPenaltyApi } from '/@/api/ADPenalty/aDPenalty';
+
+//鐖剁骇浼犻�掓潵鐨勫嚱鏁帮紝鐢ㄤ簬鍥炶皟
+const emit = defineEmits(["reloadTable"]);
+const aDPenaltyApi = useADPenaltyApi();
+const ruleFormRef = ref();
+
+const state = reactive({
+	title: '',
+	loading: false,
+	showDialog: false,
+	ruleForm: {} as any,
+	stores: {},
+	dropdownData: {} as any,
+});
+
+// 鑷娣诲姞鍏朵粬瑙勫垯
+const rules = ref<FormRules>({
+  decisionDate: [{required: true, message: '璇烽�夋嫨鍐冲畾鏃ユ湡锛�', trigger: 'change',},],
+});
+
+// 椤甸潰鍔犺浇鏃�
+onMounted(async () => {
+});
+
+// 鎵撳紑寮圭獥
+const openDialog = async (row: any, title: string) => {
+	state.title = title;
+	row = row ?? {  };
+	state.ruleForm = row.id ? await aDPenaltyApi.detail(row.id).then(res => res.data.result) : JSON.parse(JSON.stringify(row));
+	state.showDialog = true;
+};
+
+// 鍏抽棴寮圭獥
+const closeDialog = () => {
+	emit("reloadTable");
+	state.showDialog = false;
+};
+
+// 鎻愪氦
+const submit = async () => {
+	ruleFormRef.value.validate(async (isValid: boolean, fields?: any) => {
+		if (isValid) {
+			let values = state.ruleForm;
+			await aDPenaltyApi[state.ruleForm.id ? 'update' : 'add'](values);
+			closeDialog();
+		} else {
+			ElMessage({
+				message: `琛ㄥ崟鏈�${Object.keys(fields).length}澶勯獙璇佸け璐ワ紝璇蜂慨鏀瑰悗鍐嶆彁浜,
+				type: "error",
+			});
+		}
+	});
+};
+
+//灏嗗睘鎬ф垨鑰呭嚱鏁版毚闇茬粰鐖剁粍浠�
+defineExpose({ openDialog });
+</script>
+<template>
+	<div class="aDPenalty-container">
+		<el-dialog v-model="state.showDialog" :width="800" draggable :close-on-click-modal="false">
+			<template #header>
+				<div style="color: #fff">
+					<span>{{ state.title }}</span>
+				</div>
+			</template>
+			<el-form :model="state.ruleForm" ref="ruleFormRef" label-width="auto" :rules="rules">
+				<el-row :gutter="35">
+					<el-form-item v-show="false">
+						<el-input v-model="state.ruleForm.id" />
+					</el-form-item>
+					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20" >
+						<el-form-item label="鍐冲畾鏃ユ湡" prop="decisionDate">
+							<el-date-picker v-model="state.ruleForm.decisionDate" type="date" placeholder="鍐冲畾鏃ユ湡" />
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20" >
+						<el-form-item label="褰撲簨浜�" prop="parties">
+							<el-input v-model="state.ruleForm.parties" placeholder="璇疯緭鍏ュ綋浜嬩汉" maxlength="255" show-word-limit clearable />
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" >
+						<el-form-item label="妗堢敱" prop="caseReason">
+							<el-input v-model="state.ruleForm.caseReason" placeholder="璇疯緭鍏ユ鐢�" type="textarea" show-word-limit clearable />
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="mb20" >
+						<el-form-item label="澶勭悊鍐冲畾" prop="disposalDecision">
+							<el-input v-model="state.ruleForm.disposalDecision" type="textarea" placeholder="璇疯緭鍏ュ鐞嗗喅瀹�" show-word-limit clearable />
+						</el-form-item>
+					</el-col>
+					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20" >
+						<el-form-item label="閲囪喘鐩戠潱閮ㄩ棬" prop="supervisionDepartment">
+							<el-input v-model="state.ruleForm.supervisionDepartment" placeholder="璇疯緭鍏ラ噰璐洃鐫i儴闂�" maxlength="255" show-word-limit clearable />
+						</el-form-item>
+					</el-col>
+					 <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12" class="mb20">
+						<el-form-item label="绾夸笂鍦板潃" prop="url">
+							<el-input v-model="state.ruleForm.url" placeholder="璇疯緭鍏ョ嚎涓婂湴鍧�" maxlength="255" show-word-limit clearable />
+						</el-form-item>
+					</el-col>
+				</el-row>
+			</el-form>
+			<template #footer>
+				<span class="dialog-footer">
+					<el-button @click="() => state.showDialog = false">鍙� 娑�</el-button>
+					<el-button @click="submit" type="primary" v-reclick="1000">纭� 瀹�</el-button>
+				</span>
+			</template>
+		</el-dialog>
+	</div>
+</template>
+<style lang="scss" scoped>
+:deep(.el-select), :deep(.el-input-number) {
+  width: 100%;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.1