wangfukang 3 years ago
parent
commit
14351ac0f4
  1. 108
      pages/index/dataStatistics.vue
  2. 2
      pages/index/index.vue
  3. 12
      pages/index/orderDetail.vue
  4. 11
      pages/inventory/goodsList1.vue

108
pages/index/dataStatistics.vue

@ -0,0 +1,108 @@
<template>
<view>
<uni-datetime-picker style="margin-bottom:10px;" v-model="range" type="daterange" />
<view class="IndexContent">
<view class="contentPadding">
<u-grid :col="2">
<u-grid-item>
<u-count-to :start-val="0" :end-val="shopInfo.totalAmount" :decimals="2"></u-count-to>
<text class="grid-text">销售总金额</text>
</u-grid-item>
<u-grid-item>
<u-count-to :start-val="0" :end-val="shopInfo.totalCount"></u-count-to>
<view class="grid-text">销售笔数</view>
</u-grid-item>
<u-grid-item>
<u-count-to :start-val="0" :end-val="type==0?shopInfo.totalProfit:0" :decimals="2"></u-count-to>
<view class="grid-text">今日利润</view>
</u-grid-item>
<u-grid-item>
<u-count-to :start-val="0" :end-val="shopInfo.totalCCount"></u-count-to>
<view class="grid-text">下单客户数</view>
</u-grid-item>
</u-grid>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
range:''
};
},
onLoad(options) {
},
onShow(){
},
methods: {
}
}
</script>
<style lang="scss">
.contentPadding {
padding: 28upx 20upx;
background-color: #fff;
color: #909399;
.title {
padding-left: 20rpx;
font-size: 32rpx;
color: #303133;
margin-bottom: 26rpx;
line-height: 66rpx;
image {
display: inline-block;
width: 40rpx;
vertical-align: middle;
}
.btn {
text-align: right;
width: 24%;
float: right;
font-size: 26rpx;
color: $u-primary;
}
}
.grid-text {
font-size: 28rpx;
margin-bottom: 26rpx;
}
}
.u-grid-item.data-v-5b3a01af {
width: 44% !important;
height: 160rpx;
background: linear-gradient(#84C1FF, #C4E1FF) !important;
margin-left: 4%;
border-radius: 30rpx;
margin-top: 20rpx !important;
color: #fff !important;
}
.u-grid-item.data-v-5b3a01af:nth-child(2) {
background: linear-gradient(#FFBB77, #FFDCB9) !important;
}
.u-grid-item.data-v-5b3a01af:nth-child(3) {
background: linear-gradient(#1AFD9C, #7AFEC6) !important;
}
.u-grid-item.data-v-5b3a01af:nth-child(4) {
background: linear-gradient(#79FF79, #BBFFBB) !important;
}
.u-count-num {
color: #FFF !important
}
.uni-date{
background: #fff;
}
</style>

2
pages/index/index.vue

@ -215,7 +215,7 @@
},
gotoSearchData() {
uni.navigateTo({
url: '/pages/index/searchData'
url: '/pages/index/dataStatistics'
})
},
gotoOrder() {

12
pages/index/orderDetail.vue

@ -1,6 +1,6 @@
<template>
<view class="container">
<uni-card :title="sales.userName == null ?'暂无':sales.userName" thumbnail="/static/images/dingdan/dd0.png">
<uni-card :title="sales.userName == null ?'暂无':sales.userName+'('+order.phone+')'" thumbnail="/static/images/dingdan/dd0.png">
<view class="uni-body" v-if="sales.province != null">{{sales.province + sales.area + sales.city + sales.receiveAddress}} </view>
</uni-card>
@ -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;

11
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

Loading…
Cancel
Save