From a19133219811f9286fa71a0fb8c1deb628cf74a3 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期四, 28 十一月 2024 16:51:08 +0800
Subject: [PATCH] #
---
zy-asrs-admin/src/views/task/taskLog/index.vue | 74 ++++++++++++++++++++++++++++++++-----
1 files changed, 64 insertions(+), 10 deletions(-)
diff --git a/zy-asrs-admin/src/views/task/taskLog/index.vue b/zy-asrs-admin/src/views/task/taskLog/index.vue
index e4c406e..2227509 100644
--- a/zy-asrs-admin/src/views/task/taskLog/index.vue
+++ b/zy-asrs-admin/src/views/task/taskLog/index.vue
@@ -1,7 +1,7 @@
<script setup>
import { getCurrentInstance, ref, computed, reactive } from 'vue';
import { useRouter } from "vue-router";
-import { get, post, postBlob } from '@/utils/request.js'
+import { get, post, postBlob, postForm } from '@/utils/request.js'
import { message, Modal } from 'ant-design-vue';
import { logout } from '@/config.js';
import EditView from './edit.vue'
@@ -16,8 +16,21 @@
let currentPage = 1;
let pageSize = 10;
const searchInput = ref("")
+const searchParam = ref({
+ taskNo: null,
+ taskSts: null,
+ taskType: null,
+ originLoc: null,
+ targetLoc: null,
+ barcode: null,
+})
const editChild = ref(null)
const showTaskDetlChild = ref(null)
+
+const state = reactive({
+ selectedRowKeys: [],
+ loading: false,
+});
let tableData = ref([]);
getPage();
@@ -143,10 +156,7 @@
},
];
-const state = reactive({
- selectedRowKeys: [],
- loading: false,
-});
+
const hasSelected = computed(() => state.selectedRowKeys.length > 0);
const start = () => {
state.loading = true;
@@ -162,15 +172,20 @@
};
function getPage() {
+ state.loading = true;
+
post('/api/taskLog/page', {
current: currentPage,
pageSize: pageSize,
- condition: searchInput.value
+ condition: searchInput.value,
+ _param: searchParam.value,
}).then((resp) => {
let result = resp.data;
if (result.code == 200) {
let data = result.data;
tableData.value = data;
+
+ state.loading = false;
} else if (result.code === 401) {
message.error(result.msg);
logout()
@@ -239,6 +254,23 @@
showTaskDetlChild.value.taskId = record.id;
}
+const taskStsQueryList = ref(null);
+taskStsQuery();
+function taskStsQuery() {
+ postForm('/api/taskSts/query', {}).then(resp => {
+ let result = resp.data;
+ taskStsQueryList.value = result.data;
+ })
+}
+const taskTypeQueryList = ref(null);
+taskTypeQuery();
+function taskTypeQuery() {
+ postForm('/api/taskType/query', {}).then(resp => {
+ let result = resp.data;
+ taskTypeQueryList.value = result.data;
+ })
+}
+
</script>
<script>
@@ -251,17 +283,39 @@
<div>
<EditView ref="editChild" @tableReload="handleTableReload" />
<div class="table-header">
- <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '璇疯緭鍏�')"
- style="width: 200px;" @search="onSearch" />
+ <div>
+ <a-input v-model:value="searchParam.taskNo" :placeholder="formatMessage('page.task.taskNo.input', '璇疯緭鍏ヤ换鍔$紪鍙�')"
+ style="width: 140px;margin-right: 10px;" />
+ <a-select v-model:value="searchParam.taskSts"
+ :placeholder="formatMessage('page.task.taskSts.select', '璇烽�夋嫨浠诲姟鐘舵��')" style="width: 140px;margin-right: 10px;"
+ show-search allowClear :options="taskStsQueryList" optionFilterProp="label" optionLabelProp="label">
+ </a-select>
+ <a-select v-model:value="searchParam.taskType"
+ :placeholder="formatMessage('page.task.taskType.select', '璇烽�夋嫨浠诲姟绫诲瀷')" style="width: 140px;margin-right: 10px;"
+ show-search allowClear :options="taskTypeQueryList" optionFilterProp="label" optionLabelProp="label">
+ </a-select>
+ <a-input v-model:value="searchParam.originLoc"
+ :placeholder="formatMessage('page.task.originLoc.input', '璇疯緭鍏ユ簮搴撲綅')"
+ style="width: 140px;margin-right: 10px;" />
+ <a-input v-model:value="searchParam.targetLoc"
+ :placeholder="formatMessage('page.task.targetLoc.input', '璇疯緭鍏ョ洰鏍囧簱浣�')"
+ style="width: 140px;margin-right: 10px;" />
+ <a-input v-model:value="searchParam.barcode" :placeholder="formatMessage('page.task.barcode.input', '璇疯緭鍏ユ墭鐩樼爜')"
+ style="width: 140px;margin-right: 10px;" />
+
+ <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '璇疯緭鍏�')"
+ style="width: 200px;" @search="onSearch" />
+ </div>
<div class="table-header-right">
- <a-button @click="handleEdit(null)" type="primary">{{ formatMessage('page.add', '娣诲姞') }}</a-button>
+ <!-- <a-button @click="handleEdit(null)" type="primary">{{ formatMessage('page.add', '娣诲姞') }}</a-button> -->
<a-button @click="handleExport">{{ formatMessage('page.export', '瀵煎嚭') }}</a-button>
</div>
</div>
<a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"
:data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id"
:pagination="{ total: tableData.total, onChange: onPageChange }"
- :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn">
+ :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns" @resizeColumn="handleResizeColumn"
+ :loading="state.loading">
<template #bodyCell="{ column, text, record }">
<template v-if="column.dataIndex === 'oper'">
<div style="display: flex;justify-content: space-evenly;">
--
Gitblit v1.9.1