|
|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <ul class="flex space-x-2 rtl:space-x-reverse">
|
|
|
+ <ul class="flex space-x-2 rtl:space-x-reverse">
|
|
|
<li>
|
|
|
<a href="javascript:;" class="hover:underline" @click="goHome">首页</a>
|
|
|
</li>
|
|
|
@@ -54,7 +54,7 @@
|
|
|
lastArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M11 19L17 12L11 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> <path opacity="0.5" d="M6.99976 19L12.9998 12L6.99976 5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg> '
|
|
|
previousArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M15 5L9 12L15 19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'
|
|
|
nextArrow='<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="w-4.5 h-4.5 rtl:rotate-180"> <path d="M9 5L15 12L9 19" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/> </svg>'>
|
|
|
- <!-- <template #transfer_time="data">
|
|
|
+ <!-- <template #transfer_time="data">
|
|
|
{{ formatDate(data.value.transfer_time) }}
|
|
|
</template> -->
|
|
|
<template #in_warehouse_id="data">
|
|
|
@@ -69,10 +69,10 @@
|
|
|
<!-- <template #order_vo.pay_type="data">
|
|
|
{{ collectingAccountName(data.value.order_vo.pay_type) }}
|
|
|
</template>-->
|
|
|
-
|
|
|
+
|
|
|
<template #status="data">
|
|
|
{{ typeName(data.value.status) }}
|
|
|
- </template>
|
|
|
+ </template>
|
|
|
<!-- 定义操作栏的模板 -->
|
|
|
<template #actions="data">
|
|
|
<button @click="deliveryOrder(data)" class="btn btn-primary">查看</button>
|
|
|
@@ -82,6 +82,9 @@
|
|
|
data._rawValue }}</span> -->
|
|
|
</template>
|
|
|
</vue3-datatable>
|
|
|
+ <el-pagination class="p-2 flex justify-end" v-model:current-page="params.page_no"
|
|
|
+ :page-size="params.page_size" :small="true" layout="total, prev, pager, next" :total="totalRows"
|
|
|
+ @size-change="handleSizeChange" @current-change="handleCurrentChange" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -101,13 +104,13 @@ useMeta({ title: 'Column Chooser Table' });
|
|
|
const router = useRouter();
|
|
|
const store = useAppStore();
|
|
|
const search = ref('');
|
|
|
-const rows:any = ref([]); // 初始化rows为响应式引用
|
|
|
-const customerList:any = ref([])//初始化客户列表
|
|
|
-const warehouseList:any= ref([])//初始化客户列表
|
|
|
-const collectingAccountList:any = ref([])//初始化客户列表
|
|
|
-const deliveryList:any = ref([])//初始化客户列表
|
|
|
-const orderTypeList:any = ref([])//初始化客户列表
|
|
|
-const cols:any = ref([
|
|
|
+const rows: any = ref([]); // 初始化rows为响应式引用
|
|
|
+const customerList: any = ref([])//初始化客户列表
|
|
|
+const warehouseList: any = ref([])//初始化客户列表
|
|
|
+const collectingAccountList: any = ref([])//初始化客户列表
|
|
|
+const deliveryList: any = ref([])//初始化客户列表
|
|
|
+const orderTypeList: any = ref([])//初始化客户列表
|
|
|
+const cols: any = ref([
|
|
|
{ field: 'sn', title: '调拨单编号', isUnique: true, hide: false },
|
|
|
{ field: 'transfer_time', title: '调拨时间', hide: false },
|
|
|
{ field: 'out_warehouse_id', title: '调出仓库', hide: false },
|
|
|
@@ -116,7 +119,7 @@ const cols:any = ref([
|
|
|
{ field: 'status', title: '状态', hide: false },
|
|
|
{ field: 'actions', title: '操作', hide: true }
|
|
|
]);
|
|
|
-const params = ref([
|
|
|
+const params:any = ref([
|
|
|
{ page_no: 1, page_size: 10 }
|
|
|
])
|
|
|
/* 处理订单时间格式 */
|
|
|
@@ -157,6 +160,16 @@ const typeName = (value) => {
|
|
|
return type ? type.label : '';
|
|
|
}
|
|
|
}
|
|
|
+const totalRows: any = ref(0);
|
|
|
+const handleSizeChange = (val: number) => {
|
|
|
+
|
|
|
+ console.log(`${val} items per page`)
|
|
|
+}
|
|
|
+const handleCurrentChange = (val: number) => {
|
|
|
+ params.page_no = val
|
|
|
+ getOrderList()
|
|
|
+ console.log(`current page: ${val}`)
|
|
|
+}
|
|
|
onMounted(() => {
|
|
|
getOrderList()
|
|
|
getInforList()
|
|
|
@@ -171,8 +184,8 @@ const getOrderList = async () => {
|
|
|
const getInforList = async () => {
|
|
|
warehouseList.value = await infoApi.warehouseList({})//获取仓库列表
|
|
|
deliveryList.value = await dictionaryAPI.getExpressList(params)//获取配送方式
|
|
|
- /* customerList.value = await infoApi.customer({})//获取客户列表
|
|
|
- collectingAccountList.value = await infoApi.collectingAccount({})//获取支付方式列表*/
|
|
|
+ /* customerList.value = await infoApi.customer({})//获取客户列表
|
|
|
+ collectingAccountList.value = await infoApi.collectingAccount({})//获取支付方式列表*/
|
|
|
orderTypeList.value = await dictionaryAPI.getPage({ dictType: "transfer_status" })//获取状态
|
|
|
}
|
|
|
const deliveryOrder = async (row) => {
|
|
|
@@ -181,9 +194,14 @@ const deliveryOrder = async (row) => {
|
|
|
params: { id: row.value.id }
|
|
|
});
|
|
|
}
|
|
|
-const goHome=()=>{
|
|
|
+const goHome = () => {
|
|
|
router.replace({
|
|
|
name: 'home'
|
|
|
});
|
|
|
}
|
|
|
</script>
|
|
|
+<style>
|
|
|
+.bh-pagination {
|
|
|
+ display: none !important;
|
|
|
+}
|
|
|
+</style>
|