|
|
|
@ -1,34 +1,310 @@ |
|
|
|
<template> |
|
|
|
<view class="container"> |
|
|
|
<view class="tui-order-item boxbg"> |
|
|
|
<view class="shop-box" v-for="(item,index4) in list" :key="index4"> |
|
|
|
<uni-card :title="item.productName?item.productName:'暂无'" :sub-title="item.productSn" v-if="type=='khName'"> |
|
|
|
<view v-for="(data,index2) in item.customerBuySaleVoList" :key="index2" style="padding-bottom: 20rpx;margin-bottom: 20rpx;border-bottom: 1px solid #eee;"> |
|
|
|
<view class="uni-body" style="text-align: center;display: flex;flex-direction: column;"> |
|
|
|
<text>{{data.createTime}} </text> |
|
|
|
<text style="color:red;">实际售价:{{data.customerBuyProductDetailLogVos[0].realPrice}}</text> |
|
|
|
<view class="container"> |
|
|
|
<uni-datetime-picker style="margin-bottom:10px;" v-if="type=='khName'" v-model="range" type="daterange" @change="searchList" /> |
|
|
|
<view class="tui-order-item boxbg" v-if="type=='khName'"> |
|
|
|
<view style="background: #fff;border: 1px solid #eee;"> |
|
|
|
<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="text" activeColor="#007aff"></uni-segmented-control> |
|
|
|
</view> |
|
|
|
<view class="content"> |
|
|
|
|
|
|
|
<view v-show="current === 1"> |
|
|
|
<view class="shop-box" v-for="(item,index4) in list" :key="index4" style="background: #fff;display: block;overflow: hidden;margin: 0 auto 10px;"> |
|
|
|
<view> |
|
|
|
<view style="width: 100%;height: 80rpx;line-height: 80rpx;"> |
|
|
|
<text style="display:inline-block;width: 55%;text-align: center;font-weight: bold;font-size: 30rpx;"> |
|
|
|
日期:{{item.createTime | removeStr}} |
|
|
|
</text> |
|
|
|
<text style="display:inline-block;width: 45%;text-align: center;border-left: 1px solid #eee;"> |
|
|
|
操作:{{item.createByName}} |
|
|
|
</text> |
|
|
|
</view> |
|
|
|
<uni-table border stripe emptyText="暂无更多数据"> |
|
|
|
<!-- 表头行 --> |
|
|
|
<uni-tr style="background: #eee;"> |
|
|
|
<uni-th align="center" width="60">货号</uni-th> |
|
|
|
<uni-th align="center" width="50">数量</uni-th> |
|
|
|
<uni-th align="center" width="70">拿货金额</uni-th> |
|
|
|
<uni-th align="center" width="70">采购成本</uni-th> |
|
|
|
<uni-th align="center" width="70">利润</uni-th> |
|
|
|
</uni-tr> |
|
|
|
<!-- 表格数据行 --> |
|
|
|
<uni-tr v-for="(item1,index) in item.saleDetailDTOList" :key="index" @tap="xiaoshouDetail('1',item1)"> |
|
|
|
<uni-td align="center">{{item1.productSn}}</uni-td> |
|
|
|
<uni-td align="center">{{item1.productCount == null ?'0':item1.productCount}}</uni-td> |
|
|
|
<uni-td align="center">{{item1.discountAmount * item1.productCount}}</uni-td> |
|
|
|
<uni-td align="center">{{userType == 0 && isDownKH == false?(item1.purchasePrice * item1.productCount):'0'}}</uni-td> |
|
|
|
<uni-td align="center">{{userType == 0 && isDownKH == false?((item1.discountAmount - item1.purchasePrice)*item1.productCount).toFixed(2):0}}</uni-td> |
|
|
|
</uni-tr> |
|
|
|
</uni-table> |
|
|
|
</view> |
|
|
|
<view style="margin: 5px 0;height: 1px;background: #eee;"></view> |
|
|
|
<view style="display: flex;border-bottom: 1px solid #eee;height: 50rpx;line-height: 50rpx;"> |
|
|
|
<view style="width: 70%;text-align: center;border-right: 1px solid #eee;">商品规格</view> |
|
|
|
<view style="width: 29%;text-align: center;">数量</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-show="current === 0"> |
|
|
|
<view style="background: linear-gradient(90deg, #6484fa 0%, #66e8ff 100%);overflow: hidden;color:#eee;"> |
|
|
|
<view class="top" ref="top"> |
|
|
|
<view class="top1"> |
|
|
|
<view class="hello-box"> |
|
|
|
<view class="hello-left"> |
|
|
|
<text style="font-size: 40rpx;font-weight: 800;line-height: 56rpx;color: rgba(86, 132, 255, 1);"> |
|
|
|
Hi |
|
|
|
</text> |
|
|
|
</view> |
|
|
|
<view class="hello-name"> |
|
|
|
{{shopName+'对账单'}} |
|
|
|
</view> |
|
|
|
<view class="hello-right"></view> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="hello-text"> |
|
|
|
欢迎查看客户:{{duizhangList.userName == null ?"" : duizhangList.userName}}的对账单 |
|
|
|
</view> |
|
|
|
<view style="text-align: center;display: flex;border-top: 1px solid #eee;padding: 10px 0;color: #7E5E60;position: absolute;top: 380rpx;width: 100%;font-weight: bold;"> |
|
|
|
<view style="display: flex;flex-direction: column;width: 20%;"> |
|
|
|
<text>{{duizhangList.initialArrears >= 0?'期初欠款':'期初余额'}}</text> |
|
|
|
<text>{{duizhangList.initialArrears == null ?"0" :Math.abs(duizhangList.initialArrears)}}</text> |
|
|
|
</view> |
|
|
|
<view style="display: flex;flex-direction: column;width: 20%;border-left: 1px solid #eee;"> |
|
|
|
<text>{{duizhangList.endArrears >= 0?'期末欠款':'期末余额'}}</text> |
|
|
|
<text>{{duizhangList.endArrears == null ?"0" :Math.abs(duizhangList.endArrears)}}</text> |
|
|
|
</view> |
|
|
|
<view style="display: flex;flex-direction: column;width: 20%;border-left: 1px solid #eee;"> |
|
|
|
<text>{{duizhangList.arrears >= 0?'本期欠款':'本期余额'}}</text> |
|
|
|
<text>{{duizhangList.arrears == null ?"0" :Math.abs(duizhangList.arrears)}}</text> |
|
|
|
</view> |
|
|
|
<view style="display: flex;flex-direction: column;width: 20%;border-left: 1px solid #eee;"> |
|
|
|
<text>拿货总额</text> |
|
|
|
<text>{{duizhangList.totalSale == null ?"0" :duizhangList.totalSale}}</text> |
|
|
|
</view> |
|
|
|
<view style="display: flex;flex-direction: column;width: 20%;border-left: 1px solid #eee;"> |
|
|
|
<text>退货总额</text> |
|
|
|
<text>{{duizhangList.totalReturn == null ?"0" :duizhangList.totalReturn}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view v-for="(data1,index) in data.customerBuyProductDetailLogVos" :key="index" style='height: 50rpx;line-height: 50rpx;'> |
|
|
|
<view style="width: 70%;text-align: center;border-right: 1px solid #eee;float: left;height: 50rpx;overflow: hidden;"> |
|
|
|
{{data1.attributeList | sliceMsg}} |
|
|
|
|
|
|
|
</view> |
|
|
|
<view v-if="duizhangList" v-for="(item,index) in duizhangRecords" :key="index" style="background: #fff;display: block;overflow: hidden;margin: 20rpx auto;width: 95%;border-radius: 10px;"> |
|
|
|
<view style="display: flex;"> |
|
|
|
<view style="margin-top: 40rpx;width: 100rpx;height: 100rpx;border-radius: 80rpx;background: #8470FF;color: #fff;font-size: 26rpx;padding: 17rpx 24rpx;margin: 35rpx 0 0 35rpx;"> |
|
|
|
{{item.dealingsType == 0 ?"销售开单" :item.dealingsType == 1 ?"退货" :item.dealingsType == 2 ?"回款" :item.dealingsType == 3 && item.amount< 0?"初始余额" :item.dealingsType == 3 && item.amount>= 0?"初始欠款" :item.dealingsType == 4 ?"充值金额" :item.dealingsType == 5 ?"追加欠款" :item.dealingsType == 6 ?"撤销订单" :""}} |
|
|
|
</view> |
|
|
|
<view style="height: 170rpx;line-height: 50rpx;padding-left: 30rpx;"> |
|
|
|
<view style="color: #747474;font-size: 28rpx;font-weight: bold;font-size: 32rpx;color: #000;margin-top:36rpx;"> |
|
|
|
{{item.createTime | removeStr}} |
|
|
|
</view> |
|
|
|
<view style="color: #747474;font-size: 28rpx;"> |
|
|
|
操作人:{{item.createByName == null ?"" :item.createByName}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-if="item.billSaleDetailVos != null || item.billReturnSaleDetailVos != null" style="height: 60rpx;line-height: 60rpx;padding-left: 20rpx;font-size: 28rpx;background: #FFF0F5;color: #F08080;margin-bottom: 20rpx;width: 95%;margin: 0 auto 20rpx;border-radius: 5px;"> |
|
|
|
拿货数据~请查收 |
|
|
|
</view> |
|
|
|
<view v-if="item.billSaleDetailVos != null" style="width: 95%;margin: 0 auto;border: 1.5px solid #000;border-radius: 10px;"> |
|
|
|
<uni-table stripe> |
|
|
|
<uni-tr style="background: #FFBF00;"> |
|
|
|
<uni-th align="center" width="120"> |
|
|
|
<text style="font-weight: bold;"> |
|
|
|
【销】 |
|
|
|
</text> |
|
|
|
货号 |
|
|
|
</uni-th> |
|
|
|
<uni-th align="center" width="55">数量</uni-th> |
|
|
|
<uni-th align="center" width="70">销售价</uni-th> |
|
|
|
<uni-th align="center" width="80">总价</uni-th> |
|
|
|
</uni-tr> |
|
|
|
<!-- 表格数据行 --> |
|
|
|
<uni-tr v-for="(item1,index1) in item.billSaleDetailVos" :key="index1" @tap="clickDetail(item1)"> |
|
|
|
<uni-td align="center"> |
|
|
|
<text> |
|
|
|
{{item1.productSn == null ?"" :item1.productSn}} |
|
|
|
</text> |
|
|
|
</uni-td> |
|
|
|
<uni-td align="center">{{item1.productCount == null ?"0" :item1.productCount}}</uni-td> |
|
|
|
<uni-td align="center">{{item1.discountAmount == null ?"0" :item1.discountAmount}}</uni-td> |
|
|
|
<uni-td align="center">{{item1.totalAmount == null ?"0" :item1.totalAmount}}</uni-td> |
|
|
|
</uni-tr> |
|
|
|
</uni-table> |
|
|
|
</view> |
|
|
|
<view v-if="item.billReturnSaleDetailVos != null" style="width: 95%;margin: 20rpx auto 0;border: 1.5px solid #000;border-radius: 10px;"> |
|
|
|
<uni-table stripe> |
|
|
|
<uni-tr style="background: #FFBF00;"> |
|
|
|
<uni-th align="center" width="120"> |
|
|
|
<text style="font-weight: bold;color:#F08080;"> |
|
|
|
【退】 |
|
|
|
</text> |
|
|
|
货号 |
|
|
|
</uni-th> |
|
|
|
<!-- <uni-th align="center">规格</uni-th> --> |
|
|
|
<uni-th align="center" width="55">数量</uni-th> |
|
|
|
<uni-th align="center" width="70">退货价</uni-th> |
|
|
|
<uni-th align="center" width="80">总价</uni-th> |
|
|
|
</uni-tr> |
|
|
|
<!-- 表格数据行 --> |
|
|
|
<uni-tr v-for="(item1,index1) in item.billReturnSaleDetailVos" :key="index1" @tap="clickDetail(item1)"> |
|
|
|
<uni-td align="center"> |
|
|
|
<text> |
|
|
|
{{item1.productSn == null ?"" :item1.productSn}} |
|
|
|
</text> |
|
|
|
</uni-td> |
|
|
|
<uni-td align="center">{{item1.productCount == null ?"0" :item1.productCount}}</uni-td> |
|
|
|
<uni-td align="center">{{item1.discountAmount == null ?"0" :item1.discountAmount}}</uni-td> |
|
|
|
<uni-td align="center">{{item1.totalAmount == null ?"0" :item1.totalAmount}}</uni-td> |
|
|
|
</uni-tr> |
|
|
|
</uni-table> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view style="border-bottom: 2px solid #eee;" v-if="item.billSaleDetailVos != null"> |
|
|
|
<view style="font-weight: bold;padding: 20rpx;"> |
|
|
|
付款明细: |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<view> |
|
|
|
<view style="padding-left: 20rpx;"> |
|
|
|
<text>销售金额:{{item.totalAmount == null ?"0" :item.totalAmount}}</text> |
|
|
|
</view> |
|
|
|
<view style="padding-left: 20rpx;"> |
|
|
|
<text>退货金额:{{item.returnSaleTotalAmount == null ?"0" :item.returnSaleTotalAmount}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="padding-left: 20rpx;margin-top: 40rpx;"> |
|
|
|
<view>欠款抵退货:{{item.debtDeductionAmount == null ?"0" :item.debtDeductionAmount}}</view> |
|
|
|
<view>销售抵退货:{{item.saleDeductionAmount == null ?"0" :item.saleDeductionAmount}}</view> |
|
|
|
<view>余额抵销售:{{item.balanceDeductionAmount == null ?"0" :item.balanceDeductionAmount}}</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="width: 29%;text-align: center;float: left;"> |
|
|
|
{{data1.productCount}} |
|
|
|
<view style="padding-left: 10px;margin: 20px 0 10px;height: 60rpx;line-height: 60rpx;text-align: center;font-size: 30rpx;font-weight: bold;display: flex;"> |
|
|
|
<text style="flex: 1;">本单实收:{{item.realAmount == null ?"0" :item.realAmount}}</text> |
|
|
|
<text style="display: inline-block;padding-left: 20rpx;flex: 1;">本单已收:{{item.alreadyEarn == null ?"0" :item.alreadyEarn}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="text-align: center;display: flex;padding: 10px 0;color: #000;"> |
|
|
|
<view v-if="item.lastDebtAmount >= 0" style="flex: 1;display: flex;flex-direction: column;"> |
|
|
|
<text>之前欠款</text> |
|
|
|
<text>{{item.lastDebtAmount == null ?"0" :item.lastDebtAmount}}</text> |
|
|
|
</view> |
|
|
|
<view v-if="item.lastDebtAmount < 0" style="flex: 1;display: flex;flex-direction: column;"> |
|
|
|
<text>之前余额</text> |
|
|
|
<text>{{item.lastDebtAmount == null ?"0" :Math.abs(item.lastDebtAmount)}}</text> |
|
|
|
</view> |
|
|
|
<view v-if="item.dealingsType == 5 || item.amount >= 0" style="flex: 1;border-left: 1px solid #eee;display: flex;flex-direction: column;"> |
|
|
|
<text>{{item.dealingsType == 5?'追加欠款':item.dealingsType == 4?'充值金额':item.dealingsType == 6?'撤销余额':'本单欠款'}}</text> |
|
|
|
<text>{{item.amount == null ?"0" :item.dealingsType == 5?Math.abs(item.amount):item.amount}}</text> |
|
|
|
</view> |
|
|
|
<view v-if="item.amount < 0 && item.dealingsType != 5" style="flex: 1;border-left: 1px solid #eee;display: flex;flex-direction: column;"> |
|
|
|
<text>{{item.dealingsType == 4?'充值金额':item.dealingsType == 6?'撤销欠款':'本单余额'}}</text> |
|
|
|
<text>{{item.amount == null ?"0" :Math.abs(item.amount)}}</text> |
|
|
|
</view> |
|
|
|
<view v-if="item.balanceDue >= 0" style="flex: 1;border-left: 1px solid #eee;display: flex;flex-direction: column;"> |
|
|
|
<text>{{item.dealingsType == 6?'撤销后欠款':'本单后欠款'}}</text> |
|
|
|
<text>{{item.balanceDue == null ?"0" :item.balanceDue}}</text> |
|
|
|
</view> |
|
|
|
<view v-if="item.balanceDue < 0" style="flex: 1;border-left: 1px solid #eee;display: flex;flex-direction: column;"> |
|
|
|
<text>{{item.dealingsType == 6?'撤销后余额':'本单后余额'}}</text> |
|
|
|
<text>{{item.balanceDue == null ?"0" :Math.abs(item.balanceDue)}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="text-align: center;margin-bottom:20rpx;"> |
|
|
|
<text>对账时间:{{duizhangList.queryDate == null ?"" :duizhangList.queryDate}}</text> |
|
|
|
</view> |
|
|
|
<view style="text-align: center;height: 100rpx;line-height: 100rpx;border-top: 1px solid #eee;color: #777;"> |
|
|
|
<text>用快衣店AI,入库、开单更方便</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-show="current === 2"> |
|
|
|
<view class="shop-box" v-for="(item,index4) in list" :key="index4" style="background: #fff;display: block;overflow: hidden;margin: 0 auto 10px;"> |
|
|
|
<view> |
|
|
|
<view style="padding-left: 20rpx;margin: 40rpx 0; font-weight: bold;font-size: 36rpx;text-align: center;"> |
|
|
|
<text>货号:{{item.productSn}}</text> |
|
|
|
</view> |
|
|
|
<view style="text-align: center;margin-bottom:20rpx;"> |
|
|
|
<text>名称:{{item.productName}}</text> |
|
|
|
<text style="padding: 0 20rpx;">总数量:{{item.productCount == undefined ?'0':item.productCount}}</text> |
|
|
|
<!-- <text style="padding: 0 20rpx;" v-if="userType == 0">利润:{{item1.lirun.toFixed(2)}}</text> --> |
|
|
|
</view> |
|
|
|
<uni-table border stripe emptyText="暂无更多数据"> |
|
|
|
<!-- 表头行 --> |
|
|
|
<uni-tr style="background: #eee;"> |
|
|
|
<uni-th align="center" width="100">日期</uni-th> |
|
|
|
<uni-th align="center" width="50">数量</uni-th> |
|
|
|
<uni-th align="center" width="70">拿货价</uni-th> |
|
|
|
<uni-th align="center" width="70">采购价</uni-th> |
|
|
|
<uni-th align="center" width="70">利润</uni-th> |
|
|
|
</uni-tr> |
|
|
|
<!-- 表格数据行 --> |
|
|
|
<uni-tr v-for="(item1,index1) in item.customerBuySaleVoList" :key="index1" @tap="xiaoshouDetail('2',item1)"> |
|
|
|
<uni-td align="center">{{item1.createTime | removeStr}}</uni-td> |
|
|
|
<uni-td align="center">{{item1.productCount}}</uni-td> |
|
|
|
<uni-td align="center">{{item1.customerBuyProductDetailLogVos[0].realPrice * item1.productCount}}</uni-td> |
|
|
|
<uni-td align="center">{{userType == 0 && isDownKH == false?item1.customerBuyProductDetailLogVos[0].purchasePrice * item1.productCount:0}}</uni-td> |
|
|
|
<uni-td align="center">{{userType == 0 && isDownKH == false?((item1.customerBuyProductDetailLogVos[0].realPrice - item1.customerBuyProductDetailLogVos[0].purchasePrice) * item1.productCount).toFixed(2):0}}</uni-td> |
|
|
|
</uni-tr> |
|
|
|
</uni-table> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-show="current === 3"> |
|
|
|
<view v-for="(item,index) in list" :key="index" style="background: #fff;display: block;overflow: hidden;margin: 0 auto 10px;"> |
|
|
|
<view style="width: 100%;height: 80rpx;line-height: 80rpx;"> |
|
|
|
<text style="display:inline-block;width: 55%;text-align: center;font-weight: bold;font-size: 30rpx;"> |
|
|
|
日期:{{item.createTime | removeStr}} |
|
|
|
</text> |
|
|
|
<text style="display:inline-block;width: 45%;text-align: center;border-left: 1px solid #eee;"> |
|
|
|
操作:{{item.createByName}} |
|
|
|
</text> |
|
|
|
</view> |
|
|
|
<uni-table border stripe emptyText="暂无更多数据"> |
|
|
|
<!-- 表头行 --> |
|
|
|
<uni-tr style="background: #eee;"> |
|
|
|
<uni-th align="center" width="85">货号</uni-th> |
|
|
|
<uni-th align="center" width="50">数量</uni-th> |
|
|
|
<uni-th align="center" width="70">退货价</uni-th> |
|
|
|
<uni-th align="center" width="70">采购价</uni-th> |
|
|
|
</uni-tr> |
|
|
|
<!-- 表格数据行 --> |
|
|
|
<uni-tr v-for="(items,index1) in item.returnSaleDetailList" :key="index1" @tap="xiaoshouDetail('3',items)"> |
|
|
|
<uni-td align="center">{{items.productSn}}</uni-td> |
|
|
|
<uni-td align="center">{{item.productCount}}</uni-td> |
|
|
|
<uni-td align="center">{{items.discountAmount}}</uni-td> |
|
|
|
<uni-td align="center">{{userType == 0 && isDownKH == false?items.purchasePrice == null?0:items.purchasePrice:0}}</uni-td> |
|
|
|
</uni-tr> |
|
|
|
</uni-table> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="shop-box" v-if="type==1" v-for="(item,index3) in list" :key="index3"> |
|
|
|
<uni-card :title="'供应商:'+ (item.purchase.supplierName?item.purchase.supplierName:'暂无')" |
|
|
|
:sub-title="item.purchase.createTime?item.purchase.createTime:'暂无'" > |
|
|
|
<view class="uni-body" style="text-align: center;"><text v-if="userType == 0 && isDownKH == false">采购价:{{item.purchaseDetails[0].purchasePrice?item.purchaseDetails[0].purchasePrice:'暂无'}}</text> 总数量:{{item.purchase.totalAmount?item.purchase.totalAmount:'暂无'}}</view> |
|
|
|
<view style="margin: 5px 0;height: 1px;background: #eee;"></view> |
|
|
|
<view style="display: flex;border-bottom: 1px solid #eee;height: 50rpx;line-height: 50rpx;"> |
|
|
|
<view style="width: 49%;text-align: center;border-right: 1px solid #eee;">商品规格</view> |
|
|
|
<view style="width: 50%;text-align: center;">总数量</view> |
|
|
|
</view> |
|
|
|
<view v-for="(items,index1) in item.purchaseDetails" :key="index1"> |
|
|
|
<view v-for="(data,index2) in items.stockLogList1" :key="index2" style='height: 50rpx;line-height: 50rpx;'> |
|
|
|
<view style="width: 49%;text-align: center;border-right: 1px solid #eee;float: left;"> |
|
|
|
{{data.attributeList | sliceMsg}} |
|
|
|
</view> |
|
|
|
<view style="width: 50%;text-align: center;float: left;"> |
|
|
|
{{data.productCount}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</uni-card> |
|
|
|
|
|
|
|
<uni-card :title="item.productName?item.productName:'暂无'" :sub-title="item.productSn" v-else> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="tui-order-item boxbg" v-else> |
|
|
|
<view class="shop-box" v-for="(item,index4) in list" :key="index4"> |
|
|
|
<uni-card :title="item.productName?item.productName:'暂无'" :sub-title="item.productSn"> |
|
|
|
<view v-for="(data,index2) in item.supplierBuySaleVos" :key="index2" style="padding-bottom: 20rpx;margin-bottom: 20rpx;border-bottom: 1px solid #eee;"> |
|
|
|
<view class="uni-body" style="text-align: center;display: flex;flex-direction: column;"> |
|
|
|
<text>{{data.createTime}} </text> |
|
|
|
<text v-if="userType==0" style="color:red;">采购价:{{data.supplierBuyProductDetailLogVos[0].purchasePrice}}</text> |
|
|
|
<text v-if="userType == 0 && isDownKH == false" style="color:red;">采购价:{{data.supplierBuyProductDetailLogVos[0].purchasePrice}}</text> |
|
|
|
</view> |
|
|
|
<view style="margin: 5px 0;height: 1px;background: #eee;"></view> |
|
|
|
<view style="display: flex;border-bottom: 1px solid #eee;height: 50rpx;line-height: 50rpx;"> |
|
|
|
@ -45,9 +321,61 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</uni-card> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-if="type =='khName'" style="width: 90rpx;height: 80rpx;position: fixed;bottom: 50rpx;right: 40rpx;"> |
|
|
|
<button open-type="share" class="shareBtn"> |
|
|
|
<uni-icons type="redo" size="32"></uni-icons> |
|
|
|
<text>分享</text> |
|
|
|
</button> |
|
|
|
</view> |
|
|
|
<u-loadmore :status="status" /> |
|
|
|
<u-loadmore :status="status" /> |
|
|
|
<!-- 弹出销售商品规格 --> |
|
|
|
<uni-popup ref="xsdetailPopup" background-color="#fff"> |
|
|
|
<view style="width: 500rpx;min-height: 500rpx;max-height: 1000rpx;overflow: scroll;"> |
|
|
|
<view @tap="$refs.xsdetailPopup.close()" style='width: 50rpx;height: 50rpx;position: absolute;right: 20rpx;top: 25rpx;'> |
|
|
|
<uni-icons type="closeempty" color="red" size="22"></uni-icons> |
|
|
|
</view> |
|
|
|
<view style="height: 100rpx;line-height: 100rpx;font-weight: bold;font-size: 36rpx;text-align: center;"> |
|
|
|
规格数量详情 |
|
|
|
</view> |
|
|
|
<uni-table border stripe emptyText="暂无更多数据" style="margin-bottom: 20rpx;border-radius: 10px;"> |
|
|
|
<!-- 表头行 --> |
|
|
|
<uni-tr style="background: #eee;"> |
|
|
|
<uni-th align="center" width="80">规格</uni-th> |
|
|
|
<uni-th align="center" width="55">数量</uni-th> |
|
|
|
</uni-tr> |
|
|
|
<!-- 表格数据行 --> |
|
|
|
<uni-tr v-for="(item,index) in GDList" :key="index"> |
|
|
|
<uni-td align="center">{{item.attributeList | sliceMsg}}</uni-td> |
|
|
|
<uni-td align="center">{{item.productCount}}</uni-td> |
|
|
|
</uni-tr> |
|
|
|
</uni-table> |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
<!-- 弹出商品规格 --> |
|
|
|
<uni-popup ref="detailPopup" background-color="#fff"> |
|
|
|
<view style="width: 250px;min-height: 250px;max-height: 1000rpx;overflow: scroll;"> |
|
|
|
<view @tap="$refs.detailPopup.close()" style='width: 50rpx;height: 50rpx;position: absolute;right: 20rpx;top: 25rpx;'> |
|
|
|
<uni-icons type="closeempty" color="red" size="22"></uni-icons> |
|
|
|
</view> |
|
|
|
<view style="height: 100rpx;line-height: 100rpx;font-weight: bold;font-size: 36rpx;text-align: center;"> |
|
|
|
{{detailList.productName}}({{detailList.productSn}}) |
|
|
|
</view> |
|
|
|
<uni-table border stripe emptyText="暂无更多数据" style="margin-bottom: 20rpx;"> |
|
|
|
<!-- 表头行 --> |
|
|
|
<uni-tr style="background: #eee;"> |
|
|
|
<uni-th align="center" width="80">规格</uni-th> |
|
|
|
<uni-th align="center" width="55">数量</uni-th> |
|
|
|
</uni-tr> |
|
|
|
<!-- 表格数据行 --> |
|
|
|
<uni-tr v-for="(item,index) in detailList.billAttributeListVos" :key="index"> |
|
|
|
<uni-td align="center">{{item.attributeList | sliceMsg}}</uni-td> |
|
|
|
<uni-td align="center">{{item.productCount}}</uni-td> |
|
|
|
</uni-tr> |
|
|
|
</uni-table> |
|
|
|
</view> |
|
|
|
</uni-popup> |
|
|
|
</view> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -56,12 +384,22 @@ |
|
|
|
data() { |
|
|
|
return { |
|
|
|
list:[], |
|
|
|
range:[], |
|
|
|
GDList:[], |
|
|
|
status: 'loadmore', |
|
|
|
pages: 1, |
|
|
|
pageNum: 1, |
|
|
|
userId:'', |
|
|
|
shopId:'', |
|
|
|
duizhangRecords:[], |
|
|
|
detailList:{}, |
|
|
|
duizhangList:{}, |
|
|
|
type:'', |
|
|
|
userType:'' |
|
|
|
isDownKH:false, |
|
|
|
userType:uni.getStorageSync('type'), |
|
|
|
items:['对账单', '拿货(按订单)','拿货(按商品)','退货明细'], |
|
|
|
current: 1, |
|
|
|
shopName:"" |
|
|
|
} |
|
|
|
}, |
|
|
|
filters: { |
|
|
|
@ -74,21 +412,98 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
return name; |
|
|
|
}, |
|
|
|
removeStr(val) { |
|
|
|
if(val == null){ |
|
|
|
return ""; |
|
|
|
}else{ |
|
|
|
var dotIndex = val.indexOf('.'); |
|
|
|
if (dotIndex !== -1) { |
|
|
|
return val.substring(0, dotIndex); |
|
|
|
} |
|
|
|
return val; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
onShareAppMessage() { |
|
|
|
return { |
|
|
|
title: '查看对账单详情', |
|
|
|
imageUrl: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/b28b3d46c21d4f60a334b25f56175cf3.jpg', |
|
|
|
path: '/pages/index/customAndSupplierProductDetail?popleType=khName&id=' + this.userId + '&shopId=' + this.shopId+ '&shopName=' + this.shopName |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
|
let that = this; |
|
|
|
this.getMonth(); |
|
|
|
this.userId = option.id |
|
|
|
this.userType = uni.getStorageSync('type') |
|
|
|
this.type = option.popleType |
|
|
|
this.type = option.popleType |
|
|
|
this.shopName = option.shopName ?option.shopName : uni.getStorageSync('shopName') |
|
|
|
this.shopId = option.shopId ?option.shopId : uni.getStorageSync('shopId') |
|
|
|
if(option.shopId && option.shopId != uni.getStorageSync('shopId')){ |
|
|
|
this.isDownKH = true |
|
|
|
} |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
onReachBottom() { |
|
|
|
if (this.pages >= this.pageNum) return; |
|
|
|
if (this.pageNum >= this.pages) return; |
|
|
|
this.status = 'loading'; |
|
|
|
this.pages = ++this.pages; |
|
|
|
this.getList(); |
|
|
|
this.pageNum++; |
|
|
|
if(this.current == 0){ |
|
|
|
this.duizhangdan() |
|
|
|
}else{ |
|
|
|
this.getList(); |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
//获取当月1日到当前时间 |
|
|
|
getMonth() { |
|
|
|
let date = new Date() |
|
|
|
let year = date.getFullYear().toString() //'年' |
|
|
|
let month = date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1).toString():(date.getMonth()+1).toString() //'月' |
|
|
|
let da = date.getDate() < 10 ? '0'+date.getDate().toString():date.getDate().toString() //'日' |
|
|
|
let end = year + '-' + month + '-' + da //当天 |
|
|
|
let beg = year + '-' + month + '-01' //当月第一天 |
|
|
|
this.range = [beg,end] |
|
|
|
}, |
|
|
|
duizhangdan(){ |
|
|
|
this.tui.request("/app/bill/getCustomerBill", "post", { |
|
|
|
customerId:this.userId, |
|
|
|
pageNum:this.pageNum, |
|
|
|
pageSize:'10', |
|
|
|
startDate:this.range[0], |
|
|
|
endDate:this.range[1], |
|
|
|
shopId:this.shopId |
|
|
|
}, false, false).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.status = 'nomore'; |
|
|
|
if (this.pages == 1) { |
|
|
|
this.duizhangList = res.result |
|
|
|
this.duizhangRecords = res.result.customerBillSaleVos.records |
|
|
|
} else { |
|
|
|
for(let i=0;i<res.result.customerBillSaleVos.records.length;i++){ |
|
|
|
this.duizhangRecords.push(res.result.customerBillSaleVos.records[i]) |
|
|
|
} |
|
|
|
} |
|
|
|
this.pages = res.result.customerBillSaleVos.pages |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
}).catch((res) => {}) |
|
|
|
}, |
|
|
|
xiaoshouDetail(type,item){ |
|
|
|
if(item){ |
|
|
|
if(type == '1'){ |
|
|
|
this.GDList = item.stockLogList1 |
|
|
|
this.$refs.xsdetailPopup.open() |
|
|
|
}else if(type == '2'){ |
|
|
|
this.GDList = item.customerBuyProductDetailLogVos |
|
|
|
this.$refs.xsdetailPopup.open() |
|
|
|
}else if(type == '3'){ |
|
|
|
this.GDList = item.stockLogList1 |
|
|
|
this.$refs.xsdetailPopup.open() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
getList(id) { |
|
|
|
this.status = 'loading'; |
|
|
|
var url,data |
|
|
|
@ -100,11 +515,37 @@ |
|
|
|
pageNum: this.pageNum |
|
|
|
} |
|
|
|
}else{ |
|
|
|
url = "/app/sale/getCustomerBuyProductLog" |
|
|
|
data = { |
|
|
|
userId: this.userId, |
|
|
|
pageSize: 10, |
|
|
|
pageNum: this.pageNum |
|
|
|
if(this.current == 1){ |
|
|
|
url = "/app/sale/listPages" |
|
|
|
data = { |
|
|
|
userId: this.userId, |
|
|
|
pageVo: {pageSize: 10, pageNumber: this.pageNum}, |
|
|
|
searchStr: "", |
|
|
|
startTime:this.range[0], |
|
|
|
endTime:this.range[1], |
|
|
|
shopId:this.shopId, |
|
|
|
fromWhere:1 |
|
|
|
} |
|
|
|
}else if(this.current == 2){ |
|
|
|
url = "/app/sale/getCustomerBuyProductLog" |
|
|
|
data = { |
|
|
|
userId: this.userId, |
|
|
|
pageSize: 10, |
|
|
|
startDate:this.range[0], |
|
|
|
endDate:this.range[1], |
|
|
|
pageNum: this.pageNum, |
|
|
|
shopId:this.shopId |
|
|
|
} |
|
|
|
}else if(this.current == 3){ |
|
|
|
url = "/app/return/getReturnSaleListByUserId" |
|
|
|
data = { |
|
|
|
userId:this.userId, |
|
|
|
startDate:this.range[0], |
|
|
|
endDate:this.range[1], |
|
|
|
pageNum:this.pageNum, |
|
|
|
pageSize:"10", |
|
|
|
shopId:this.shopId |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.tui.request(url, "post", data, false, false).then((res) => { |
|
|
|
@ -117,12 +558,83 @@ |
|
|
|
this.list = [...this.list, ...res.result.records] |
|
|
|
|
|
|
|
} |
|
|
|
this.pageNum = res.result.pages |
|
|
|
this.pages = res.result.pages |
|
|
|
if(this.current == 1){ |
|
|
|
for(let i=0;i<this.list.length;i++){ |
|
|
|
for(let j=0;j<this.list[i].saleDetailDTOList.length;j++){ |
|
|
|
this.list[i].saleDetailDTOList[j].productCount = 0 |
|
|
|
for(let m=0;m<this.list[i].saleDetailDTOList[j].stockLogList1.length;m++){ |
|
|
|
this.list[i].saleDetailDTOList[j].productCount += this.list[i].saleDetailDTOList[j].stockLogList1[m].productCount |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.$forceUpdate() |
|
|
|
}else if(this.current == 2){ |
|
|
|
for(let i=0;i<this.list.length;i++){ |
|
|
|
this.list[i].productCount = 0 |
|
|
|
for(let j=0;j<this.list[i].customerBuySaleVoList.length;j++){ |
|
|
|
this.list[i].customerBuySaleVoList[j].productCount = 0 |
|
|
|
|
|
|
|
for(let m=0;m<this.list[i].customerBuySaleVoList[j].customerBuyProductDetailLogVos.length;m++){ |
|
|
|
this.list[i].productCount += this.list[i].customerBuySaleVoList[j].customerBuyProductDetailLogVos[m].productCount |
|
|
|
this.list[i].customerBuySaleVoList[j].productCount += this.list[i].customerBuySaleVoList[j].customerBuyProductDetailLogVos[m].productCount |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.$forceUpdate() |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.tui.toast(res.message) |
|
|
|
} |
|
|
|
}).catch((res) => {}) |
|
|
|
} |
|
|
|
}, |
|
|
|
clickDetail(item){ |
|
|
|
this.detailList = item |
|
|
|
this.$refs.detailPopup.open() |
|
|
|
}, |
|
|
|
onClickItem(e) { |
|
|
|
if (this.current !== e.currentIndex) { |
|
|
|
this.current = e.currentIndex |
|
|
|
} |
|
|
|
if(e.currentIndex == 0){ |
|
|
|
this.duizhangList = [] |
|
|
|
this.pageNum = 1 |
|
|
|
this.pages = 1 |
|
|
|
this.duizhangdan() |
|
|
|
}else if(e.currentIndex == 1){ |
|
|
|
this.list = [] |
|
|
|
this.pageNum = 1 |
|
|
|
this.getList() |
|
|
|
}else if(e.currentIndex == 2){ |
|
|
|
this.list = [] |
|
|
|
this.pageNum = 1 |
|
|
|
this.getList() |
|
|
|
}else if(e.currentIndex == 3){ |
|
|
|
this.list = [] |
|
|
|
this.pageNum = 1 |
|
|
|
this.getList() |
|
|
|
} |
|
|
|
}, |
|
|
|
searchList() { |
|
|
|
if(this.current == 0){ |
|
|
|
this.duizhangList = [] |
|
|
|
this.pageNum = 1 |
|
|
|
this.pages = 1 |
|
|
|
this.duizhangdan() |
|
|
|
}else if(this.current == 1){ |
|
|
|
this.list = [] |
|
|
|
this.pageNum = 1 |
|
|
|
this.getList() |
|
|
|
}else if(this.current == 2){ |
|
|
|
this.list = [] |
|
|
|
this.pageNum = 1 |
|
|
|
this.getList() |
|
|
|
}else if(this.current == 3){ |
|
|
|
this.list = [] |
|
|
|
this.pageNum = 1 |
|
|
|
this.getList() |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |
|
|
|
@ -135,14 +647,10 @@ |
|
|
|
font-weight: bold; |
|
|
|
} |
|
|
|
.container { |
|
|
|
padding-bottom: 118rpx; |
|
|
|
|
|
|
|
|
|
|
|
.boxbg { |
|
|
|
padding-top: 10rpx; |
|
|
|
background-color: #fff; |
|
|
|
margin: 30upx; |
|
|
|
border-radius: 10upx; |
|
|
|
box-shadow: 0px 1px 10px 2px #e2e2e2; |
|
|
|
background-color: #FAF7F7; |
|
|
|
} |
|
|
|
|
|
|
|
.tui-order-item { |
|
|
|
@ -235,7 +743,6 @@ |
|
|
|
margin-right: 30rpx; |
|
|
|
} |
|
|
|
.shop-box { |
|
|
|
width: 95%; |
|
|
|
margin: 0 auto; |
|
|
|
position: relative; |
|
|
|
} |
|
|
|
@ -314,10 +821,102 @@ |
|
|
|
padding-left: 20rpx; |
|
|
|
border-bottom: 1px solid #088FEB; |
|
|
|
} |
|
|
|
.shareBtn{ |
|
|
|
background: rgba(255, 255, 255, 0); |
|
|
|
width: 90rpx; |
|
|
|
height: 50; |
|
|
|
height: 80rpx; |
|
|
|
line-height: 80rpx; |
|
|
|
border: 1px solid #f3f4f6; |
|
|
|
background-color: rgba(255,255,255,0); |
|
|
|
} |
|
|
|
.shareBtn::after{ |
|
|
|
border: none; |
|
|
|
} |
|
|
|
textarea { |
|
|
|
margin: 20rpx; |
|
|
|
border: 1px solid #eee; |
|
|
|
height: 150rpx; |
|
|
|
width: 500rpx; |
|
|
|
} |
|
|
|
.uni-table-scroll { |
|
|
|
width: 100%; |
|
|
|
overflow-x: auto; |
|
|
|
border-radius: 10px; |
|
|
|
} |
|
|
|
.uni-table-th{ |
|
|
|
background: #FAE7B5 !important; |
|
|
|
color: #000 !important; |
|
|
|
} |
|
|
|
.top1 { |
|
|
|
width: 780rpx; |
|
|
|
height: 390rpx; |
|
|
|
opacity: 1; |
|
|
|
background: linear-gradient(360deg, #FAF7F7 0%, rgba(255, 255, 255, 0) 100%); |
|
|
|
} |
|
|
|
|
|
|
|
.ai-bot { |
|
|
|
position: absolute; |
|
|
|
top: 200rpx; |
|
|
|
right: 40rpx; |
|
|
|
width: 90rpx; |
|
|
|
height: 110rpx; |
|
|
|
background-size: 100% !important; |
|
|
|
background: url(https://jewel-shop.oss-cn-beijing.aliyuncs.com/66dc640d9e8f4749a234d9ef2af1b257.png) no-repeat; |
|
|
|
} |
|
|
|
|
|
|
|
.hello-box { |
|
|
|
position: absolute; |
|
|
|
left: 42rpx; |
|
|
|
top: 205rpx; |
|
|
|
width: 220rpx; |
|
|
|
height: 56rpx; |
|
|
|
|
|
|
|
.hello-left { |
|
|
|
width: 102rpx; |
|
|
|
height: 56rpx; |
|
|
|
opacity: 1; |
|
|
|
background: #fff; |
|
|
|
border-radius: 3px; |
|
|
|
text-align: center; |
|
|
|
transform: skewX(8deg); |
|
|
|
} |
|
|
|
|
|
|
|
.hello-right { |
|
|
|
position: absolute; |
|
|
|
left: 5px; |
|
|
|
bottom: 0rpx; |
|
|
|
width: 220rpx; |
|
|
|
height: 2px; |
|
|
|
opacity: 1; |
|
|
|
background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #ffffff 100%); |
|
|
|
} |
|
|
|
|
|
|
|
.hello-name { |
|
|
|
position: absolute; |
|
|
|
left: 118rpx; |
|
|
|
top: 0; |
|
|
|
width: 400rpx; |
|
|
|
height: 55rpx; |
|
|
|
font-size: 32rpx; |
|
|
|
line-height: 55rpx; |
|
|
|
color: white; |
|
|
|
overflow: hidden; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.hello-text { |
|
|
|
position: absolute; |
|
|
|
top: 275rpx; |
|
|
|
left: 50rpx; |
|
|
|
color: #fff; |
|
|
|
font-size: 28rpx; |
|
|
|
} |
|
|
|
.top { |
|
|
|
width: 780rpx; |
|
|
|
height: 330rpx; |
|
|
|
opacity: 1; |
|
|
|
background: linear-gradient(90deg, #6484fa 0%, #66e8ff 100%); |
|
|
|
overflow: hidden; |
|
|
|
} |
|
|
|
</style> |