|
|
@@ -2,18 +2,27 @@
|
|
|
<div>
|
|
|
<div>
|
|
|
<label>单据号</label>
|
|
|
- <a-input v-model:value="searchParams.documentNo" class="common" @press-enter="searchChange" />
|
|
|
+ <a-input
|
|
|
+ v-model:value="searchParams.documentNo"
|
|
|
+ class="common"
|
|
|
+ @press-enter="searchChange"
|
|
|
+ />
|
|
|
<label class="common">单据名称</label>
|
|
|
- <a-input v-model:value="searchParams.documentName" class="common" @press-enter="searchChange" />
|
|
|
+ <a-input
|
|
|
+ v-model:value="searchParams.documentName"
|
|
|
+ class="common"
|
|
|
+ @press-enter="searchChange"
|
|
|
+ />
|
|
|
<a-button class="common" type="primary" @click="searchChange">
|
|
|
查询
|
|
|
</a-button>
|
|
|
</div>
|
|
|
<CommonTable
|
|
|
+ ref="table"
|
|
|
:columns="columns"
|
|
|
:data-source="dataSource"
|
|
|
:total="total"
|
|
|
- @get-page="getPageParams"
|
|
|
+ @get-pager="getPageParams"
|
|
|
>
|
|
|
<template #bodyCell="{ column, record }">
|
|
|
<template v-if="column.key === 'processed'">
|
|
|
@@ -36,13 +45,17 @@
|
|
|
>
|
|
|
关闭
|
|
|
</a-button>
|
|
|
- <a-button v-if="record.processed === true" type="primary" @click="operate(record)">
|
|
|
+ <a-button
|
|
|
+ v-if="record.processed === true"
|
|
|
+ type="primary"
|
|
|
+ @click="operate(record)"
|
|
|
+ >
|
|
|
打开
|
|
|
</a-button>
|
|
|
</template>
|
|
|
</template>
|
|
|
</CommonTable>
|
|
|
- <a-button style="margin-top: 20px" type="primary" @click="previous">
|
|
|
+ <a-button class="previousBtn" type="primary" @click="previous">
|
|
|
上一步
|
|
|
</a-button>
|
|
|
</div>
|
|
|
@@ -51,11 +64,11 @@
|
|
|
import Common from '../../common/Common';
|
|
|
import { SqlApi, Notify } from 'pc-component-v3';
|
|
|
import { ref, reactive, defineEmits, onMounted, createVNode } from 'vue';
|
|
|
-import CommonTable from './CommonTable.vue';
|
|
|
+import CommonTable from '../../common/CommonTable.vue';
|
|
|
import { Modal } from 'ant-design-vue';
|
|
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
|
|
import AssetInventoryResource from '../../api/asset/AssetInventoryResource.js';
|
|
|
-
|
|
|
+import { debounce } from '../../common/utils.js';
|
|
|
// 查询参数
|
|
|
const searchParams = reactive({
|
|
|
documentNo: '',
|
|
|
@@ -76,13 +89,13 @@ const columns = reactive(
|
|
|
title: '单据号',
|
|
|
key: 'documentNo',
|
|
|
dataIndex: 'documentNo',
|
|
|
- width:200,
|
|
|
+ width: 200,
|
|
|
},
|
|
|
{
|
|
|
title: '单据名称',
|
|
|
key: 'name',
|
|
|
dataIndex: 'name',
|
|
|
- width:200,
|
|
|
+ width: 200,
|
|
|
},
|
|
|
{
|
|
|
title: '盘点状态',
|
|
|
@@ -108,13 +121,13 @@ const columns = reactive(
|
|
|
title: '操作',
|
|
|
key: 'operation',
|
|
|
dataIndex: 'operation',
|
|
|
- fixed:'right',
|
|
|
+ fixed: 'right',
|
|
|
},
|
|
|
].map(item => ({ ...item, align: 'center' })),
|
|
|
);
|
|
|
const dataSource = ref([]);
|
|
|
const total = ref(0); // 数据总数
|
|
|
-
|
|
|
+const table = ref();
|
|
|
// 打开关闭盘点单操作
|
|
|
const operate = record => {
|
|
|
Modal.confirm({
|
|
|
@@ -145,10 +158,9 @@ const operate = record => {
|
|
|
};
|
|
|
|
|
|
// 查询按钮功能
|
|
|
-const searchChange = () => {
|
|
|
- searchParams.offset = 0;
|
|
|
- queryAssetDiscovery();
|
|
|
-};
|
|
|
+const searchChange = debounce(() => {
|
|
|
+ table.value.backFirstPage();
|
|
|
+}, 500);
|
|
|
|
|
|
const emits = defineEmits(['previous']);
|
|
|
// const amisWindowNo = '20220516_164216';
|
|
|
@@ -193,4 +205,8 @@ input {
|
|
|
.common {
|
|
|
margin-left: 8px;
|
|
|
}
|
|
|
+.previousBtn {
|
|
|
+ position: fixed;
|
|
|
+ top: 93%;
|
|
|
+ }
|
|
|
</style>
|