From c49a9d727dd7620c3a9cb67c512b29bab842b1eb Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 04 十一月 2025 10:41:17 +0800
Subject: [PATCH] 仓储物流-查询条件加一个日期
---
src/views/system/notice/index.vue | 111 ++++++++++++++++++++++++++++---------------------------
1 files changed, 57 insertions(+), 54 deletions(-)
diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue
index fd74fcd..8043db0 100644
--- a/src/views/system/notice/index.vue
+++ b/src/views/system/notice/index.vue
@@ -136,7 +136,7 @@
<el-radio
v-for="dict in sys_notice_status"
:key="dict.value"
- :label="dict.value"
+ :value="dict.value"
>{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
@@ -159,20 +159,21 @@
</template>
<script setup name="Notice">
-import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api/system/notice";
+import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api/system/notice"
+import {onMounted} from "vue";
-const { proxy } = getCurrentInstance();
-const { sys_notice_status, sys_notice_type } = proxy.useDict("sys_notice_status", "sys_notice_type");
+const { proxy } = getCurrentInstance()
+const { sys_notice_status, sys_notice_type } = proxy.useDict("sys_notice_status", "sys_notice_type")
-const noticeList = ref([]);
-const open = ref(false);
-const loading = ref(true);
-const showSearch = ref(true);
-const ids = ref([]);
-const single = ref(true);
-const multiple = ref(true);
-const total = ref(0);
-const title = ref("");
+const noticeList = ref([])
+const open = ref(false)
+const loading = ref(true)
+const showSearch = ref(true)
+const ids = ref([])
+const single = ref(true)
+const multiple = ref(true)
+const total = ref(0)
+const title = ref("")
const data = reactive({
form: {},
@@ -187,24 +188,24 @@
noticeTitle: [{ required: true, message: "鍏憡鏍囬涓嶈兘涓虹┖", trigger: "blur" }],
noticeType: [{ required: true, message: "鍏憡绫诲瀷涓嶈兘涓虹┖", trigger: "change" }]
},
-});
+})
-const { queryParams, form, rules } = toRefs(data);
+const { queryParams, form, rules } = toRefs(data)
/** 鏌ヨ鍏憡鍒楄〃 */
function getList() {
- loading.value = true;
+ loading.value = true
listNotice(queryParams.value).then(response => {
- noticeList.value = response.rows;
- total.value = response.total;
- loading.value = false;
- });
+ noticeList.value = response.rows
+ total.value = response.total
+ loading.value = false
+ })
}
/** 鍙栨秷鎸夐挳 */
function cancel() {
- open.value = false;
- reset();
+ open.value = false
+ reset()
}
/** 琛ㄥ崟閲嶇疆 */
@@ -215,45 +216,45 @@
noticeType: undefined,
noticeContent: undefined,
status: "0"
- };
- proxy.resetForm("noticeRef");
+ }
+ proxy.resetForm("noticeRef")
}
/** 鎼滅储鎸夐挳鎿嶄綔 */
function handleQuery() {
- queryParams.value.pageNum = 1;
- getList();
+ queryParams.value.pageNum = 1
+ getList()
}
/** 閲嶇疆鎸夐挳鎿嶄綔 */
function resetQuery() {
- proxy.resetForm("queryRef");
- handleQuery();
+ proxy.resetForm("queryRef")
+ handleQuery()
}
/** 澶氶�夋閫変腑鏁版嵁 */
function handleSelectionChange(selection) {
- ids.value = selection.map(item => item.noticeId);
- single.value = selection.length != 1;
- multiple.value = !selection.length;
+ ids.value = selection.map(item => item.noticeId)
+ single.value = selection.length != 1
+ multiple.value = !selection.length
}
/** 鏂板鎸夐挳鎿嶄綔 */
function handleAdd() {
- reset();
- open.value = true;
- title.value = "娣诲姞鍏憡";
+ reset()
+ open.value = true
+ title.value = "娣诲姞鍏憡"
}
/**淇敼鎸夐挳鎿嶄綔 */
function handleUpdate(row) {
- reset();
- const noticeId = row.noticeId || ids.value;
+ reset()
+ const noticeId = row.noticeId || ids.value
getNotice(noticeId).then(response => {
- form.value = response.data;
- open.value = true;
- title.value = "淇敼鍏憡";
- });
+ form.value = response.data
+ open.value = true
+ title.value = "淇敼鍏憡"
+ })
}
/** 鎻愪氦鎸夐挳 */
@@ -262,31 +263,33 @@
if (valid) {
if (form.value.noticeId != undefined) {
updateNotice(form.value).then(response => {
- proxy.$modal.msgSuccess("淇敼鎴愬姛");
- open.value = false;
- getList();
- });
+ proxy.$modal.msgSuccess("淇敼鎴愬姛")
+ open.value = false
+ getList()
+ })
} else {
addNotice(form.value).then(response => {
- proxy.$modal.msgSuccess("鏂板鎴愬姛");
- open.value = false;
- getList();
- });
+ proxy.$modal.msgSuccess("鏂板鎴愬姛")
+ open.value = false
+ getList()
+ })
}
}
- });
+ })
}
/** 鍒犻櫎鎸夐挳鎿嶄綔 */
function handleDelete(row) {
const noticeIds = row.noticeId || ids.value
proxy.$modal.confirm('鏄惁纭鍒犻櫎鍏憡缂栧彿涓�"' + noticeIds + '"鐨勬暟鎹」锛�').then(function() {
- return delNotice(noticeIds);
+ return delNotice(noticeIds)
}).then(() => {
- getList();
- proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
+ getList()
+ proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛")
+ }).catch(() => {})
}
-getList();
+onMounted(() => {
+ getList();
+});
</script>
--
Gitblit v1.9.3