|
@@ -1,111 +1,15 @@
|
|
|
-// 单据中使用商品表
|
|
|
<template>
|
|
|
<div>
|
|
|
- <a-table
|
|
|
- class="ant-table-striped"
|
|
|
- rowKey="itemid"
|
|
|
- :columns="columns"
|
|
|
- :data-source="data"
|
|
|
- :scroll="{x:'max-content'}"
|
|
|
- :pagination="{showSizeChanger:true,defaultPageSize:20,total:total}"
|
|
|
- @change="onChange"
|
|
|
- size="small"
|
|
|
- :row-class-name="(_record, index) => (index % 2 === 1 ? 'table-striped' : null)">
|
|
|
- <template #bodyCell="{ column, record }">
|
|
|
- <template v-if="column.dataIndex === 'amount'">
|
|
|
- <a-tag>{{utils.formatAmount(record.amount)}}</a-tag>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
- </a-table>
|
|
|
+ <normalTable size="small" :columns="utils.TBLayout('incomeTable')" :param="{id:20230221193203,content:{sa_orderid:router.currentRoute.value.query.id,where:{}}}"></normalTable>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
- import {defineProps,ref,onMounted } from 'vue';
|
|
|
- import utils from '@/utils/utils'
|
|
|
- import Api from '@/api/api'
|
|
|
- import { useRouter } from "vue-router";
|
|
|
-
|
|
|
- const router = useRouter()
|
|
|
- const props = defineProps({
|
|
|
- id:Number
|
|
|
- })
|
|
|
-
|
|
|
- const param = ref({
|
|
|
- "id": 20230221193203,
|
|
|
- "content": {
|
|
|
- "sa_orderid": router.currentRoute.value.query.id,
|
|
|
- "pageNumber": 1,
|
|
|
- "pageSize": 17,
|
|
|
- "where": {
|
|
|
- "condition": ""
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- const data = ref([])
|
|
|
- const total = ref(0)
|
|
|
- const columns = [
|
|
|
- {
|
|
|
- title:'状态',
|
|
|
- dataIndex:'status',
|
|
|
- width:90,
|
|
|
- ellipsis:true,
|
|
|
- },
|
|
|
- {
|
|
|
- title:'单据编号',
|
|
|
- dataIndex:'billno',
|
|
|
- width:180,
|
|
|
- ellipsis:true,
|
|
|
- },
|
|
|
- {
|
|
|
- title:'创建日期',
|
|
|
- dataIndex:'createdate',
|
|
|
- width:150,
|
|
|
- ellipsis:true,
|
|
|
- },
|
|
|
- {
|
|
|
- title:'来源',
|
|
|
- dataIndex:'source',
|
|
|
- width:90,
|
|
|
- ellipsis:true,
|
|
|
- },
|
|
|
- {
|
|
|
- title:'收支金额',
|
|
|
- dataIndex:'amount',
|
|
|
- width:90,
|
|
|
- ellipsis:true,
|
|
|
- },
|
|
|
-
|
|
|
- {
|
|
|
- title:'备注',
|
|
|
- dataIndex:'remarks',
|
|
|
- width:250,
|
|
|
- ellipsis:true,
|
|
|
- },
|
|
|
- ]
|
|
|
- const onChange = (pagination, filters, sorter, { currentDataSource })=>{
|
|
|
- props.param.content.pageNumber = pagination.current
|
|
|
- props.param.content.pageSize = pagination.pageSize
|
|
|
- listData()
|
|
|
- }
|
|
|
- const listData = async ()=> {
|
|
|
- const res = await Api.requested(param.value)
|
|
|
- data.value = res.data
|
|
|
- total.value = res.total
|
|
|
- }
|
|
|
-
|
|
|
- onMounted(()=>{
|
|
|
- listData()
|
|
|
- })
|
|
|
+import {ref} from 'vue'
|
|
|
+import utils from '@/utils/utils'
|
|
|
+import normalTable from '@/template/normalTable/index.vue'
|
|
|
+import { useRouter } from "vue-router"
|
|
|
+const router = useRouter()
|
|
|
</script>
|
|
|
<style>
|
|
|
-
|
|
|
-</style>
|
|
|
-<style scoped>
|
|
|
-.ant-table-striped :deep td{
|
|
|
- font-size: 12px;
|
|
|
-}
|
|
|
-.ant-table-striped :deep(.table-striped) td {
|
|
|
- background-color: #fafafa;
|
|
|
-}
|
|
|
</style>
|