diff --git a/src/views/convert/component/order.vue b/src/views/convert/component/order.vue index 3a09a60..4695900 100644 --- a/src/views/convert/component/order.vue +++ b/src/views/convert/component/order.vue @@ -17,7 +17,7 @@ const list = ref([]); const tabPosition = ref(1); // 1-全部, 2-未支付 const changeTabPosition = (e) => { - where.value.page = 1; + where.value.page_no = 1; loadEnd.value = false; loading.value = false; orderList.value = []; @@ -28,8 +28,8 @@ const changeTabPosition = (e) => { const payRef = ref(null); const where = ref({ - page: 1, - limit: 20, + page_no: 1, + page_size: 20, search_info: '' }); @@ -42,7 +42,7 @@ const loadEnd = ref(false); const orderList = ref([]); const getOrderList = (reload=false) => { if(!where.value.search_info) return ElMessage.error("请输入订单编号"); - if(reload) where.value.page = 1; + if(reload) where.value.page_no = 1; else if(loadEnd.value || loading.value) return; loading.value = true; if (tabPosition.value == 1) where.value.paid = null; @@ -54,8 +54,8 @@ const getOrderList = (reload=false) => { mitt.emit("set-order-detail", orderList.value[0]); // if(reload) orderList.value = res.data.list; // else orderList.value = [...orderList.value, ...res.data.list]; - // if(res.data.list.length < where.value.limit) loadEnd.value = true; - // else where.value.page++; + // if(res.data.list.length < where.value.page_size) loadEnd.value = true; + // else where.value.page_no++; // activeStore.value = 0; // mitt.emit("set-order-detail", orderList.value[0]); // total.value = res.data.count; diff --git a/src/views/home/index.vue b/src/views/home/index.vue index a8056c1..357dfe3 100644 --- a/src/views/home/index.vue +++ b/src/views/home/index.vue @@ -22,8 +22,8 @@ const userStore = useUserStore(); const route = useRoute(); const where = ref({ - page: 0, - limit: 30, + page_no: 0, + page_size: 30, }); const getStoreList = (data={}, reload=false) => { where.value = { @@ -33,11 +33,11 @@ const getStoreList = (data={}, reload=false) => { }; if (reload) { storeList.value = []; - where.value.page = 1; + where.value.page_no = 1; loadEnd.value = false; } storeListApi(userStore.userInfo.service.mer_id, where.value).then((res) => { - if (res.data?.list?.length < where.value.limit) loadEnd.value = true; + if (res.data?.list?.length < where.value.page_size) loadEnd.value = true; let list = res.data.list.map((item) => { item.attr = Object.keys(item.sku); return item; @@ -58,7 +58,7 @@ const getStoreList = (data={}, reload=false) => { const loadEnd = ref(false); const loadMore = (data) => { if (loadEnd.value) return; - where.value.page++; + where.value.page_no++; getStoreList(data); }; @@ -143,7 +143,7 @@ const aF9 = () => { }; onMounted(() => { getStoreList(); - where.value.page++; + where.value.page_no++; mitt.on("F9", aF9); }); diff --git a/src/views/order/component/order.vue b/src/views/order/component/order.vue index 7c7f683..35f257e 100644 --- a/src/views/order/component/order.vue +++ b/src/views/order/component/order.vue @@ -26,7 +26,7 @@ const list = ref([]); const tabPosition = ref(1); // 1-全部, 2-未支付 const payType = ref(0); //支付方式 const changeTabPosition = (e) => { - where.value.page = 1; + where.value.page_no = 1; loadEnd.value = false; loading.value = false; orderList.value = []; @@ -42,8 +42,8 @@ const changeDate = () => { }; const where = ref({ - page: 1, - limit: 20, + page_no: 1, + page_size: 20, search_info: "", date: "", staff_id: 0, @@ -66,7 +66,7 @@ const activeStore = ref(0); const loadEnd = ref(false); const orderList = ref([]); const getOrderList = (reload = false) => { - if (reload) where.value.page = 1; + if (reload) where.value.page_no = 1; else if (loadEnd.value || loading.value) return; if (!props.isSystem) { where.value.staff_id = userStore.userInfo.service.service_id; @@ -81,8 +81,8 @@ const getOrderList = (reload = false) => { .then((res) => { if (reload) orderList.value = res.data.list; else orderList.value = [...orderList.value, ...res.data.list]; - if (res.data.list.length < where.value.limit) loadEnd.value = true; - else where.value.page++; + if (res.data.list.length < where.value.page_size) loadEnd.value = true; + else where.value.page_no++; activeStore.value = 0; if (orderList.value.length > 0) mitt.emit("set-order-detail", orderList.value[0]); diff --git a/src/views/order/indexCount.vue b/src/views/order/indexCount.vue index e0b4023..9c0c6e5 100644 --- a/src/views/order/indexCount.vue +++ b/src/views/order/indexCount.vue @@ -22,8 +22,8 @@ const tabPosition = ref(1); // 1-全部, 2-未收银 const payRef = ref(null); const where = ref({ - page: 1, - limit: 15, + page_no: 1, + page_size: 15, staff_id: userStore.userInfo.service.service_id, }); @@ -52,17 +52,17 @@ const getStatistics = () => { getStatistics(); const prevClick = (e) => { - where.value.page = e; + where.value.page_no = e; getOrderList(); }; const nextClick = (e) => { - where.value.page = e; + where.value.page_no = e; getOrderList(); }; const currentChange = (e) => { - where.value.page = e; + where.value.page_no = e; getOrderList(); }; diff --git a/src/views/order/indexList.vue b/src/views/order/indexList.vue index 2c9cddb..669c2fe 100644 --- a/src/views/order/indexList.vue +++ b/src/views/order/indexList.vue @@ -19,8 +19,8 @@ const tabPosition = ref(1); // 1-全部, 2-未支付 const payRef = ref(null); const where = ref({ - page: 1, - limit: 20, + page_no: 1, + page_size: 20, }); const loading = ref(false); @@ -51,22 +51,22 @@ const getCartList = () => { getCartList(); const changeTabPosition = (e) => { - where.value.page = 1; + where.value.page_no = 1; getOrderList(); }; const prevClick = (e) => { - where.value.page = e; + where.value.page_no = e; getOrderList(); }; const nextClick = (e) => { - where.value.page = e; + where.value.page_no = e; getOrderList(); }; const currentChange = (e) => { - where.value.page = e; + where.value.page_no = e; getOrderList(); }; @@ -177,7 +177,7 @@ const goHome = ()=>{ { where.value = { @@ -33,11 +33,11 @@ const getStoreList = (data = {}, reload = false) => { }; if (reload) { storeList.value = []; - where.value.page = 1; + where.value.page_no = 1; loadEnd.value = false; } saleStoreListApi(where.value).then((res) => { - if (res.data?.lists?.length < where.value.limit) loadEnd.value = true; + if (res.data?.lists?.length < where.value.page_size) loadEnd.value = true; storeList.value = storeList.value.concat(res.data.lists); if ( data.bar_code && @@ -47,7 +47,7 @@ const getStoreList = (data = {}, reload = false) => { shopRef.value.bar_code = ""; changeItem(storeList.value[0], storeList.value[0].attr[0]); } - where.value.page++; + where.value.page_no++; }); }; @@ -136,7 +136,7 @@ const aF9 = () => { }; onMounted(() => { getStoreList(); - where.value.page++; + where.value.page_no++; mitt.on("F9", aF9); }); diff --git a/src/views/saleOrder/component/order.vue b/src/views/saleOrder/component/order.vue index 0a0e98e..5215730 100644 --- a/src/views/saleOrder/component/order.vue +++ b/src/views/saleOrder/component/order.vue @@ -24,7 +24,7 @@ const list = ref([]); const tabPosition = ref(1); // 1-全部, 2-未支付 const changeTabPosition = (e) => { - where.value.page = 1; + where.value.page_no = 1; loadEnd.value = false; loading.value = false; orderList.value = []; @@ -40,8 +40,8 @@ const changeDate = ()=>{ } const where = ref({ - page: 1, - limit: 20, + page_no: 1, + page_size: 20, store_name: "", date: "", staff_id: 0, @@ -55,7 +55,7 @@ const activeStore = ref(0); const loadEnd = ref(false); const orderList = ref([]); const getOrderList = (reload = false) => { - if (reload) where.value.page = 1; + if (reload) where.value.page_no = 1; else if (loadEnd.value || loading.value) return; if(!props.isSystem) where.value.staff_id = userStore.userInfo.service.service_id; loading.value = true; @@ -65,8 +65,8 @@ const getOrderList = (reload = false) => { .then((res) => { if (reload) orderList.value = res.data.list; else orderList.value = [...orderList.value, ...res.data.list]; - if (res.data.list.length < where.value.limit) loadEnd.value = true; - else where.value.page++; + if (res.data.list.length < where.value.page_size) loadEnd.value = true; + else where.value.page_no++; activeStore.value = 0; mitt.emit("set-order-detail", orderList.value[0]); total.value = res.data.count; diff --git a/src/views/saleOrder/indexCount.vue b/src/views/saleOrder/indexCount.vue index bcde160..996e92d 100644 --- a/src/views/saleOrder/indexCount.vue +++ b/src/views/saleOrder/indexCount.vue @@ -21,8 +21,8 @@ const tabPosition = ref(1); // 1-全部, 2-未收银 const payRef = ref(null); const where = ref({ - page: 1, - limit: 15, + page_no: 1, + page_size: 15, staff_id: userStore.userInfo.service.service_id, }); @@ -51,17 +51,17 @@ const getStatistics = () => { getStatistics(); const prevClick = (e) => { - where.value.page = e; + where.value.page_no = e; getOrderList(); }; const nextClick = (e) => { - where.value.page = e; + where.value.page_no = e; getOrderList(); }; const currentChange = (e) => { - where.value.page = e; + where.value.page_no = e; getOrderList(); }; diff --git a/src/views/saleOrder/indexList.vue b/src/views/saleOrder/indexList.vue index 2c9cddb..669c2fe 100644 --- a/src/views/saleOrder/indexList.vue +++ b/src/views/saleOrder/indexList.vue @@ -19,8 +19,8 @@ const tabPosition = ref(1); // 1-全部, 2-未支付 const payRef = ref(null); const where = ref({ - page: 1, - limit: 20, + page_no: 1, + page_size: 20, }); const loading = ref(false); @@ -51,22 +51,22 @@ const getCartList = () => { getCartList(); const changeTabPosition = (e) => { - where.value.page = 1; + where.value.page_no = 1; getOrderList(); }; const prevClick = (e) => { - where.value.page = e; + where.value.page_no = e; getOrderList(); }; const nextClick = (e) => { - where.value.page = e; + where.value.page_no = e; getOrderList(); }; const currentChange = (e) => { - where.value.page = e; + where.value.page_no = e; getOrderList(); }; @@ -177,7 +177,7 @@ const goHome = ()=>{ @@ -220,7 +220,7 @@ defineExpose({ name="field" list-type="picture-card" :on-preview="handlePictureCardPreview" - :limit="9" + :page_size="9" > @@ -232,7 +232,7 @@ defineExpose({ name="field" list-type="picture-card" :on-preview="handlePictureCardPreview" - :limit="9" + :page_size="9" > diff --git a/src/views/shop/index.vue b/src/views/shop/index.vue index 36beb26..f94dae6 100644 --- a/src/views/shop/index.vue +++ b/src/views/shop/index.vue @@ -9,8 +9,8 @@ const orderList = ref([]); const userStore = useUserStore(); const where = ref({ - page: 1, - limit: 15, + page_no: 1, + page_size: 15, type: 1, keyword: "", staff_id: userStore.userInfo.service.service_id, @@ -42,17 +42,17 @@ const getShopList = (loadmore = false) => { getShopList(); const prevClick = (e) => { - where.value.page = e; + where.value.page_no = e; getShopList(); }; const nextClick = (e) => { - where.value.page = e; + where.value.page_no = e; getShopList(); }; const currentChange = (e) => { - where.value.page = e; + where.value.page_no = e; getShopList(); }; @@ -92,7 +92,7 @@ const activeIndex = ref('1'); const handleSelect = (key) => { where.value.type = key; - where.value.page = 1; + where.value.page_no = 1; getShopList(); }; @@ -194,7 +194,7 @@ const showAdd = (type='add', data)=>{