This commit is contained in:
ChenQiuYu 2025-05-17 17:04:49 +08:00
parent 4281c34423
commit a270fd8f67
6 changed files with 54 additions and 38 deletions

View File

@ -30,7 +30,7 @@ const filteredData = computed(() => {
//
const currentPage = ref(1)
const pageSize = ref(10)
const pageSize = ref(20)
const total = ref(0)
//
const code = ref('')
@ -39,12 +39,13 @@ onMounted(() => {
})
let init = () => {
const query = {
page: 1,
pageSize: 20,
pageNum: currentPage.value,
pageSize: pageSize.value,
code: code.value
}
post("social/upload/get3501List", {query: query}).then((res: any) => {
tableData.value = res.list
total.value = res.total_count
})
}
let changePage = (value: number) => {

View File

@ -135,7 +135,7 @@ const value1 = ref([])
//
const currentPage = ref(1)//
const pageSize = ref(10)//
const pageSize = ref(20)//
const total = ref(0)
// type typeName
@ -182,8 +182,8 @@ onMounted(() => {
let init = () => {
const query = {
page: 1,
pageSize: 20,
pageNum: currentPage.value,
pageSize: pageSize.value,
socialType: Number(searchInfo.value.socialType) || null,
uploadStatus: searchStatus.value.uploadStatus || null,
createTimeBefore: value1.value ? formatDate(value1.value[0]) : null,
@ -191,6 +191,7 @@ let init = () => {
}
post("social/upload/get3502List", {query: query}).then((res: any) => {
tableData.value = res.list
total.value = res.total_count
})
}
@ -240,6 +241,7 @@ const formatDate = (isoStr: any) => {
height: 60px;
display: flex;
align-items: center;
justify-content: flex-end;
}
}

View File

@ -33,11 +33,15 @@
<el-table-column prop="name" label="商品名称"/>
<el-table-column prop="number" label="进货,退货数量" show-overflow-tooltip>
<template #default="{row}">
<el-icon v-if="row.number<0" style="font-size: 9px"><Minus /></el-icon>
<el-icon v-if="row.number>0" style="font-size: 9px"><Plus /></el-icon>
<el-icon v-if="row.number<0" style="font-size: 9px">
<Minus/>
</el-icon>
<el-icon v-if="row.number>0" style="font-size: 9px">
<Plus/>
</el-icon>
<span>
<template v-if="row.number!=0">
{{Math.abs(row.number)}}{{row.packagingUnit}}
{{ Math.abs(row.number) }}{{ row.packagingUnit }}
</template>
</span>
</template>
@ -74,7 +78,7 @@
</template>
<script setup lang="ts">
import {ref, computed, onMounted} from 'vue'
import { ElInput, ElTable, ElTableColumn, ElPagination } from 'element-plus'
import {ElInput, ElTable, ElTableColumn, ElPagination} from 'element-plus'
import {post} from "@/utils/request.ts";
import {Minus, Plus} from "@element-plus/icons-vue";
@ -82,15 +86,15 @@ import {Minus, Plus} from "@element-plus/icons-vue";
const tableData = ref([])
//
const searchInfo=ref<any>({
})
const searchStatus=ref<any>({
})
const searchInfo = ref<any>({})
const searchStatus = ref<any>({})
interface TypeMapping {
[key: number]: string;
}
// type typeName
const socialTypeMapping: TypeMapping = {
const socialTypeMapping: TypeMapping = {
101: '调拨入库',
102: '调拨出库',
103: '盘盈',
@ -109,20 +113,21 @@ const uploadStatus = {
//
const currentPage = ref(1)
const pageSize = ref(10)
const total= ref(0)
onMounted(()=>{
const pageSize = ref(20)
const total = ref(0)
onMounted(() => {
init()
})
let init = ()=>{
let init = () => {
const query = {
page: 1,
pageSize: 20,
socialType:searchInfo.value.socialType||null,
uploadStatus:searchStatus.value.uploadStatus ||null,
pageNum: currentPage.value,
pageSize: pageSize.value,
socialType: searchInfo.value.socialType || null,
uploadStatus: searchStatus.value.uploadStatus || null,
}
post("social/upload/get3503List",{query: query}).then((res:any)=>{
post("social/upload/get3503List", {query: query}).then((res: any) => {
tableData.value = res.list
total.value = res.total_count
})
}
let changePage = (value: number) => {
@ -131,26 +136,27 @@ let changePage = (value: number) => {
pageNum: value,
pageSize: pageSize.value,
}
post("social/upload/get3503List",{query: query}).then((res:any)=>{
post("social/upload/get3503List", {query: query}).then((res: any) => {
tableData.value = res.list
total.value = res.total_count
})
}
let change_search=()=>{
let change_search = () => {
init()
}
// YYYY-MM-DD
const formatDate = (isoStr:any) => {
if (!isoStr){
const formatDate = (isoStr: any) => {
if (!isoStr) {
return "";
}
const date = new Date(isoStr);
return `${date.getFullYear()}-${(date.getMonth()+1).toString().padStart(2,'0')}-${date.getDate().toString().padStart(2,'0')}`;
return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`;
}
</script>
<style scoped lang="scss">
@use "@/assets/scss/base.scss";
.container {
height: 100%;
display: flex;
@ -159,19 +165,22 @@ const formatDate = (isoStr:any) => {
.top {
height: 60px;
}
.content {
flex: 1;
min-height: 0;
}
.bottom {
height: 60px;
display: flex;
align-items: center;
background: base.$background-color-base;
justify-content: flex-end;
}
}
:deep(.el-select__wrapper){
:deep(.el-select__wrapper) {
height: 42px;
}
</style>

View File

@ -8,7 +8,7 @@ import {Search} from "@element-plus/icons-vue";
const tableData = ref([])
//
const currentPage = ref(1)
const pageSize = ref(10)
const pageSize = ref(20)
const total = ref(0)
//
const code = ref('')
@ -17,12 +17,13 @@ onMounted(() => {
})
let init = () => {
const query = {
page: 1,
pageSize: 20,
pageNum: currentPage.value,
pageSize: pageSize.value,
code: code.value
}
post("social/upload/get3505List", {query: query}).then((res: any) => {
tableData.value = res.list
total.value = res.total_count
})
}
let changePage = (value: number) => {
@ -129,7 +130,7 @@ const formatDate = (isoStr: any) => {
height: 60px;
display: flex;
align-items: center;
background: base.$background-color-base;
justify-content: flex-end;
}
}

View File

@ -185,7 +185,8 @@
<el-pagination
background
layout="prev, pager, next"
:page-count="pageNum"
:current-page="pageNum"
:page-size="pageSize"
:total="total"
@current-change="changePage"
/>
@ -309,7 +310,7 @@ onMounted(() => {
let init = () => {
const query = {
pageNum: pageNum.value,//
pageSize: 1,//
pageSize: pageSize.value,//
}
post("goods/goods/searchDetail", {query: query}).then((res: any) => {
tableData.value = res.list
@ -327,6 +328,7 @@ let open_edit = (type: number, id: number) => {
//
let total = ref(0)
let pageNum = ref(1)
const pageSize= ref(20)
let changePage = (value: number) => {
pageNum.value = value
init()

View File

@ -141,8 +141,9 @@
<el-pagination
background
layout="prev, pager, next"
:current-page="pageNum"
:page-size="20"
:total="total"
:page-count="pageNum"
@current-change="handleCurrentChange"
>
</el-pagination>