From 14351ac0f4af71fa856390645668fba9f9272e67 Mon Sep 17 00:00:00 2001
From: wangfukang <15630117759@163.com>
Date: Wed, 6 Dec 2023 17:05:54 +0800
Subject: [PATCH] 11
---
pages/index/dataStatistics.vue | 108 +++++++++++++++++++++++++++++++++
pages/index/index.vue | 2 +-
pages/index/orderDetail.vue | 12 ++--
pages/inventory/goodsList1.vue | 11 ++--
4 files changed, 123 insertions(+), 10 deletions(-)
create mode 100644 pages/index/dataStatistics.vue
diff --git a/pages/index/dataStatistics.vue b/pages/index/dataStatistics.vue
new file mode 100644
index 0000000..3c29a9d
--- /dev/null
+++ b/pages/index/dataStatistics.vue
@@ -0,0 +1,108 @@
+
+
+
+
+
+
+
+
+ 销售总金额
+
+
+
+ 销售笔数
+
+
+
+ 今日利润
+
+
+
+ 下单客户数
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/index/index.vue b/pages/index/index.vue
index db3ad3e..e72b446 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -215,7 +215,7 @@
},
gotoSearchData() {
uni.navigateTo({
- url: '/pages/index/searchData'
+ url: '/pages/index/dataStatistics'
})
},
gotoOrder() {
diff --git a/pages/index/orderDetail.vue b/pages/index/orderDetail.vue
index 70548d9..b7aea80 100644
--- a/pages/index/orderDetail.vue
+++ b/pages/index/orderDetail.vue
@@ -1,6 +1,6 @@
-
+
{{sales.province + sales.area + sales.city + sales.receiveAddress}}
@@ -257,7 +257,8 @@
orderXd:[],
collection:[],
lbgName:[],
- returnAmount:0
+ returnAmount:0,
+ shopData:[]
}
},
components: {
@@ -338,7 +339,8 @@
this.sales = res.result.sale
this.list = res.result.saleDetailDTOList
this.order = res.result.customer
- this.orderXd = res.result.orderXd
+ this.orderXd = res.result.orderXd
+ this.shopData = res.result.shop
} else {
this.tui.toast(res.message)
}
@@ -366,7 +368,7 @@
blesdk.addCPCLSETBOLD('bold')
strCmd += blesdk.addCPCLText('50', '120', '24', '0', 0, '收:' + this.sales.userName)
strCmd += blesdk.addCPCLSETMAG(1, 1)
- strCmd += blesdk.addCPCLText('50', '250', '24', '0', 0, "15257485325")
+ strCmd += blesdk.addCPCLText('50', '250', '24', '0', 0, this.order.phone)
strCmd += blesdk.addCPCLSETMAG(2, 2)
blesdk.addCPCLSETBOLD('bold')
strCmd += blesdk.addCPCLText('50', '330', '24', '0', 0, this.sales.province + '/' + this.sales.city + '/' +
@@ -381,7 +383,7 @@
strCmd += blesdk.addCPCLText('0', '650', '24', '0', 0, '——————————————————————————————')
strCmd += blesdk.addCPCLText('50', '730', '24', '0', 0, '店铺:'+this.sales.shopName)
strCmd += blesdk.addCPCLText('50', '810', '24', '0', 0, '13521030702')
- strCmd += blesdk.addCPCLText('50', '890', '24', '0', 0, '地址:早市10059')
+ strCmd += blesdk.addCPCLText('50', '890', '24', '0', 0, '地址:'+this.shopData.shopAddress)
strCmd += blesdk.addCPCLLocation(0);
strCmd += blesdk.addCPCLPrint();
this.bufferData = strCmd;
diff --git a/pages/inventory/goodsList1.vue b/pages/inventory/goodsList1.vue
index 9a425ba..480c6c9 100644
--- a/pages/inventory/goodsList1.vue
+++ b/pages/inventory/goodsList1.vue
@@ -716,11 +716,14 @@
//商品上选择是零售价还是批发价
checkPay(price) {
let that = this;
- this.carList.get(this.index).discountAmount = price
- this.carList.get(this.index).unitPrice = price;
- that.carList.get(that.index).price = price * that.carList.get(that.index).productCount;
+ let num = this.carList.get(this.index)
+ num.discountAmount = price
+ num.unitPrice = price;
+ num.price = price * num.productCount;
this.$refs.inputDialog.close()
this.getAllPrice()
+ num.discountAmount = num.unitPrice * num.discount / 10
+ num.price = num.unitPrice * num.discount / 10 * num.productCount
that.relPrice = that.shouldPay
},
//整体选择时使用批发价、零售价,选择整体折扣的方法
@@ -1293,7 +1296,7 @@
that.carList.get(index).productCount = that.carList.get(index).productCount + value
if (that.discountType == 0) { //单品折扣
that.carList.get(index).price = that.carList.get(index).productCount * that.carList.get(index)
- .unitPrice * that.carList.get(index).discount / 10
+ .discountAmount * that.carList.get(index).discount / 10
}else{
that.carList.get(index).price = that.carList.get(index).productCount * that.carList.get(index)
.unitPrice