diff --git a/src/components/image-contain/index.vue b/src/components/image-contain/index.vue index e0285b921..ddc481d9f 100644 --- a/src/components/image-contain/index.vue +++ b/src/components/image-contain/index.vue @@ -1,5 +1,5 @@ + \ No newline at end of file diff --git a/src/views/label/index.vue b/src/views/label/index.vue index 0863797e1..04c97d709 100644 --- a/src/views/label/index.vue +++ b/src/views/label/index.vue @@ -35,7 +35,7 @@ diff --git a/src/views/statistics/product/index.vue b/src/views/statistics/product/index.vue index 596a0b143..ff22bc7e8 100644 --- a/src/views/statistics/product/index.vue +++ b/src/views/statistics/product/index.vue @@ -6,7 +6,7 @@
时间筛选: + end-placeholder="结束日期" unlink-panels :shortcuts="shortcuts" @change="getData" /> 查询
@@ -25,6 +25,17 @@ + + +
+ 商品趋势 +
+ 时间筛选: + + 查询 +
+
@@ -34,16 +45,16 @@ 商品排行
时间筛选: - - 查询 + + 查询
@@ -81,6 +92,17 @@ const shortcuts = [ return [start, end] }, }, + { + text: '本月', + value: () => { + const end = new Date() + const start = new Date() + start.setDate(1) + end.setMonth(end.getMonth() + 1) + end.setDate(0) + return [start, end] + }, + }, { text: '近一月', value: () => { @@ -231,6 +253,8 @@ const basicList = reactive([ } ]) const startEndTime = ref([new Date(), new Date()]); +const startEndTime2 = ref([]); +const startEndTime3 = ref([]); // 获取数据 const getData = () => { let date = ''; @@ -243,6 +267,11 @@ const getData = () => { item.percent = res[item.type].percent; }) }) +} + +const getData2 = () => { + let date = ''; + if (startEndTime2.value[0] && startEndTime2.value[1]) date = moment(startEndTime2.value[0]).format('YYYY/MM/DD') + '-' + moment(startEndTime2.value[1]).format('YYYY/MM/DD'); apiGetTrend({ date: date }).then(res => { @@ -269,7 +298,7 @@ const getData = () => { const sotreList = ref([]); const getList = () => { let date = ''; - if (startEndTime.value[0] && startEndTime.value[1]) date = moment(startEndTime.value[0]).format('YYYY/MM/DD') + '-' + moment(startEndTime.value[1]).format('YYYY/MM/DD'); + if (startEndTime3.value[0] && startEndTime3.value[1]) date = moment(startEndTime3.value[0]).format('YYYY/MM/DD') + '-' + moment(startEndTime3.value[1]).format('YYYY/MM/DD'); apiGetProductRanking({ date: date }).then(res => { @@ -279,6 +308,7 @@ const getList = () => { onMounted(() => { getData() + getData2() getList() }) diff --git a/src/views/statistics/statistics_user/index.vue b/src/views/statistics/statistics_user/index.vue index 3c25cf016..b811dc56b 100644 --- a/src/views/statistics/statistics_user/index.vue +++ b/src/views/statistics/statistics_user/index.vue @@ -6,7 +6,7 @@
时间筛选: + end-placeholder="结束日期" unlink-panels :shortcuts="shortcuts" @change="getData" /> 查询
@@ -25,7 +25,19 @@ +
+
+
+ 用户趋势 +
+ 时间筛选: + + 查询 +
+
@@ -47,6 +59,17 @@ const shortcuts = [ return [start, end] }, }, + { + text: '本月', + value: () => { + const end = new Date() + const start = new Date() + start.setDate(1) + end.setMonth(end.getMonth() + 1) + end.setDate(0) + return [start, end] + }, + }, { text: '近一月', value: () => { @@ -85,7 +108,7 @@ const visitorOption: any = reactive({ formatter: '{value}' } }, - grid:{ + grid: { left: '3%', right: '4%', bottom: '3%', @@ -201,6 +224,7 @@ const basicList = reactive([ } ]) const startEndTime = ref([new Date(), new Date()]); +const startEndTime2 = ref([]); // 获取数据 const getData = () => { let date = ''; @@ -213,6 +237,11 @@ const getData = () => { item.percent = res[item.type].percent; }) }) +} + +const getData2 = () => { + let date = ''; + if (startEndTime2.value[0] && startEndTime2.value[1]) date = moment(startEndTime2.value[0]).format('YYYY/MM/DD') + '-' + moment(startEndTime2.value[1]).format('YYYY/MM/DD'); apiGetUserTrend({ date: date }).then(res => { @@ -236,9 +265,9 @@ const getData = () => { }) } - onMounted(() => { getData() + getData2() }) diff --git a/src/views/statistics/transaction/index.vue b/src/views/statistics/transaction/index.vue index 426ba95c1..adb696cff 100644 --- a/src/views/statistics/transaction/index.vue +++ b/src/views/statistics/transaction/index.vue @@ -51,7 +51,7 @@
时间筛选: + end-placeholder="结束日期" unlink-panels :shortcuts="shortcuts" @change="getData" /> 查询
@@ -92,6 +92,17 @@ const shortcuts = [ return [start, end] }, }, + { + text: '本月', + value: () => { + const end = new Date() + const start = new Date() + start.setDate(1) + end.setMonth(end.getMonth() + 1) + end.setDate(0) + return [start, end] + }, + }, { text: '近一月', value: () => { @@ -124,7 +135,7 @@ const visitorOption: any = reactive({ }, yAxis: { type: 'value', - name: '数量', + name: '金额', position: 'left', axisLabel: { formatter: '{value}' diff --git a/src/views/store/statistics/index.vue b/src/views/store/statistics/index.vue index 5651a76f7..d9d4224e6 100644 --- a/src/views/store/statistics/index.vue +++ b/src/views/store/statistics/index.vue @@ -14,8 +14,9 @@
时间筛选: + end-placeholder="结束日期" unlink-panels :shortcuts="shortcuts" @change="getData" /> 查询 + 重置
@@ -82,6 +83,17 @@ const shortcuts = [ return [start, end] }, }, + { + text: '本月', + value: () => { + const end = new Date() + const start = new Date() + start.setDate(1) + end.setMonth(end.getMonth() + 1) + end.setDate(0) + return [start, end] + }, + }, { text: '近一月', value: () => { @@ -190,33 +202,25 @@ const circleOption: any = reactive({ // 颜色 const colorList = ['#5DB1FF', '#4CD384', '#FFC46A', '#CAA5F1', '#FFC46A', '#4CD384', '#5DB1FF', '#CAA5F1'] const basicList = reactive([ - { - name: '门店收款金额', - type: 'receipt_amount', - icon: 'RectangleCopy', - num: 0, - - }, { name: '门店营业额', type: 'order_amount', icon: 'RectangleCopy49', num: 0, + }, + + { + name: '微信条码收款金额', + type: 'wechat_code_amount', + icon: 'RectangleCopy55', + num: 0, }, { - name: '门店收益金额', - type: 'income_amount', - icon: 'RectangleCopy53', + name: '支付宝条码收款金额', + type: 'alipay_code_amount', + icon: 'RectangleCopy52', num: 0, - - }, - { - name: '核销订单金额', - type: 'verify_amount', - icon: 'RectangleCopy5', - num: 0, - }, { name: '线下收银订单金额', @@ -238,6 +242,27 @@ const basicList = reactive([ icon: 'RectangleCopy59', num: 0, + }, + { + name: '门店收款金额', + type: 'receipt_amount', + icon: 'RectangleCopy', + num: 0, + + }, + { + name: '门店收益金额', + type: 'income_amount', + icon: 'RectangleCopy53', + num: 0, + + }, + { + name: '核销订单金额', + type: 'verify_amount', + icon: 'RectangleCopy5', + num: 0, + }, { name: '门店成交用户数', @@ -251,7 +276,6 @@ const basicList = reactive([ type: 'deposit_amount', icon: 'RectangleCopy32', num: 0, - }, ]) const startEndTime = ref([new Date(), new Date()]); @@ -317,6 +341,11 @@ const getData = () => { } +const clearData = () => { + startEndTime.value = [new Date(), new Date()]; + store_id.value = ''; + getData(); +} const storeloading = ref(false); const storeList = ref([]); @@ -327,11 +356,6 @@ const remoteMethod = (e: string = '') => { page_size: 50 }).then(res => { storeList.value = res.lists; - if (store_id.value === '') { - const index = Math.floor(Math.random() * res.lists.length) - store_id.value = res.lists[index].id; - getData(); - } setTimeout(() => { storeloading.value = false; }, 300) @@ -343,7 +367,8 @@ const remoteMethod = (e: string = '') => { } onMounted(() => { - remoteMethod() + remoteMethod(); + getData(); }) diff --git a/src/views/store/store_branch_product/index.vue b/src/views/store/store_branch_product/index.vue index 3babac3fc..6ce2bd8d1 100644 --- a/src/views/store/store_branch_product/index.vue +++ b/src/views/store/store_branch_product/index.vue @@ -43,7 +43,7 @@ diff --git a/src/views/store/store_category/index.vue b/src/views/store/store_category/index.vue index 043f84f33..743279ddb 100644 --- a/src/views/store/store_category/index.vue +++ b/src/views/store/store_category/index.vue @@ -39,7 +39,7 @@ diff --git a/src/views/store/store_product/details.vue b/src/views/store/store_product/details.vue index 630d0c626..ac0b33781 100644 --- a/src/views/store/store_product/details.vue +++ b/src/views/store/store_product/details.vue @@ -9,7 +9,7 @@ {{ formData.cate_name }} - + {{ formData.bar_code }} @@ -49,7 +49,7 @@ diff --git a/src/views/store/store_product/edit.vue b/src/views/store/store_product/edit.vue index 29a28a46a..c5439b5f2 100644 --- a/src/views/store/store_product/edit.vue +++ b/src/views/store/store_product/edit.vue @@ -76,7 +76,7 @@ diff --git a/src/views/store/store_product/import.vue b/src/views/store/store_product/import.vue index 139fcaad5..ad07701f1 100644 --- a/src/views/store/store_product/import.vue +++ b/src/views/store/store_product/import.vue @@ -17,7 +17,7 @@ @@ -45,7 +45,7 @@ diff --git a/src/views/store/store_product/index.vue b/src/views/store/store_product/index.vue index 807be5d96..d13799cbd 100644 --- a/src/views/store/store_product/index.vue +++ b/src/views/store/store_product/index.vue @@ -37,7 +37,7 @@ diff --git a/src/views/store_order/components/deliverTable.vue b/src/views/store_order/components/deliverTable.vue index b3ad24cdd..42f987a9b 100644 --- a/src/views/store_order/components/deliverTable.vue +++ b/src/views/store_order/components/deliverTable.vue @@ -5,7 +5,7 @@ diff --git a/src/views/store_order/components/storeTable.vue b/src/views/store_order/components/storeTable.vue index 393cfda03..c20b3e1db 100644 --- a/src/views/store_order/components/storeTable.vue +++ b/src/views/store_order/components/storeTable.vue @@ -5,7 +5,7 @@ diff --git a/src/views/store_order/index.vue b/src/views/store_order/index.vue index 71c71a211..63c9ada09 100644 --- a/src/views/store_order/index.vue +++ b/src/views/store_order/index.vue @@ -29,11 +29,12 @@ diff --git a/src/views/store_order/refund.vue b/src/views/store_order/refund.vue index 667a15d1c..5849a2a30 100644 --- a/src/views/store_order/refund.vue +++ b/src/views/store_order/refund.vue @@ -45,7 +45,7 @@ @@ -53,7 +53,7 @@