You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1469 lines
57 KiB
1469 lines
57 KiB
<template>
|
|
<view class="container">
|
|
<uni-datetime-picker style="margin-bottom:10px;" 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-tr>
|
|
<uni-td align="center">
|
|
<text style="font-weight: bold;">总数量:</text>
|
|
</uni-td>
|
|
<uni-td align="center">
|
|
<text style="font-weight: bold;">{{item.productCount}}</text>
|
|
</uni-td>
|
|
<uni-td align="center">
|
|
<text style="font-weight: bold;"></text>
|
|
</uni-td>
|
|
<uni-td align="center">
|
|
<text style="font-weight: bold;">拿货总价:</text>
|
|
</uni-td>
|
|
<uni-td align="center">
|
|
<text style="font-weight: bold;">{{item.totalAmount}}</text>
|
|
</uni-td>
|
|
</uni-tr>
|
|
</uni-table>
|
|
</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>
|
|
<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;position: relative;">
|
|
<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>
|
|
<img v-if="item.delFlag == 1 && item.dealingsType == 0 && item.billSaleDetailVos != null" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/7650e962bef14f529406866888eeff24.png" alt="" style="position: absolute;top: 0;right:0;width: 300rpx;height: 150rpx;" />
|
|
<img v-if="item.delFlag == 1 && item.dealingsType == 0 && item.billSaleDetailVos == null" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/7517e15b5cf843d59b5b69c3a06a5d7b.png" alt="" style="position: absolute;top: 0;right:0;width: 200rpx;height: 110rpx;" />
|
|
<img v-if="item.dealingsType == 6" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/862680ecfe5a48b1a410287fb45987ef.png" alt="" style="position: absolute;top: 0;right:0;width: 300rpx;height: 150rpx;" />
|
|
</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 @tap="delDZD(item)" v-if="userType == 0 && isDownKH == false && item.billSaleDetailVos != null && (item.dealingsType == 6 || (item.dealingsType == 0 && item.delFlag == 1))" style="position: absolute;top: 173rpx;right: 17rpx;width: 100rpx;height: 60rpx;background: #088FEB;color: #fff;text-align: center;line-height: 60rpx;border-radius: 5px;">
|
|
删除
|
|
</view>
|
|
<view @tap="delDZD(item)" v-if="userType == 0 && isDownKH == false && item.billSaleDetailVos == null && (item.dealingsType == 6 || (item.dealingsType == 0 && item.delFlag == 1))" style="position: absolute;top: 116rpx;right: 17rpx;width: 100rpx;height: 60rpx;background: #088FEB;color: #fff;text-align: center;line-height: 60rpx;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="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">{{items.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>
|
|
</view>
|
|
</view>
|
|
<view class="tui-order-item boxbg" v-else>
|
|
<view style="background: #fff;border: 1px solid #eee;">
|
|
<uni-segmented-control :current="current" :values="itemsGYS" @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.purchase.createTime}}
|
|
</text>
|
|
<text
|
|
style="display:inline-block;width: 45%;text-align: center;border-left: 1px solid #eee;">
|
|
操作:{{item.purchase.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-tr>
|
|
<!-- 表格数据行 -->
|
|
<uni-tr v-for="(item1,index) in item.purchaseDetails" :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.purchasePrice?item1.purchasePrice:0}}</uni-td>
|
|
<uni-td align="center">{{item1.productCount * item1.purchasePrice || 0}}</uni-td>
|
|
</uni-tr>
|
|
<uni-tr>
|
|
<uni-td align="center">
|
|
<text style="font-weight: bold;">总数量:</text>
|
|
</uni-td>
|
|
<uni-td align="center">
|
|
<text style="font-weight: bold;">{{item.purchase.productCount}}</text>
|
|
</uni-td>
|
|
<uni-td align="center">
|
|
<text style="font-weight: bold;">总价:</text>
|
|
</uni-td>
|
|
<uni-td align="center">
|
|
<text style="font-weight: bold;">{{item.purchase.shouldPay}}</text>
|
|
</uni-td>
|
|
</uni-tr>
|
|
</uni-table>
|
|
</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: 25%;">
|
|
<text>{{duizhangList.initialArrears >= 0?'期初欠款':'期初余额'}}</text>
|
|
<text>{{duizhangList.initialArrears == null ?"0" :Math.abs(duizhangList.initialArrears)}}</text>
|
|
</view>
|
|
<view
|
|
style="display: flex;flex-direction: column;width: 25%;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: 25%;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: 25%;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>
|
|
<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;position: relative;">
|
|
<view style="display: flex;position: relative;">
|
|
<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 ?"撤销订单" :item.dealingsType == 7 ?"采购订单" :item.dealingsType == 9 ?"采购退货":""}}
|
|
</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:12rpx;">
|
|
操作时间:{{item.createTime | removeStr}}
|
|
</view>
|
|
<view v-if="item.dealingsType == 7 && item.purchaseTime != null" style="color: #747474;font-size: 28rpx;">
|
|
拿货时间:{{item.purchaseTime | removeStr}}
|
|
</view>
|
|
<view style="color: #747474;font-size: 28rpx;">
|
|
操作人:{{item.createByName == null ?"" :item.createByName}}
|
|
</view>
|
|
</view>
|
|
<img v-if="item.delFlag == 1&& item.dealingsType == 7" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/7650e962bef14f529406866888eeff24.png" alt="" style="position: absolute;top: 0;right:0;width: 300rpx;height: 150rpx;" />
|
|
<img v-if="item.dealingsType == 6" src="https://jewel-shop.oss-cn-beijing.aliyuncs.com/862680ecfe5a48b1a410287fb45987ef.png" alt="" style="position: absolute;top: 0;right:0;width: 300rpx;height: 150rpx;" />
|
|
</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 @tap="delDZD(item)" v-if="userType == 0 && isDownKH == false &&item.billSaleDetailVos != null && (item.dealingsType == 6 || (item.dealingsType == 7 && item.delFlag == 1))" style="position: absolute;top: 173rpx;right: 17rpx;width: 100rpx;height: 60rpx;background: #088FEB;color: #fff;text-align: center;line-height: 60rpx;border-radius: 5px;">
|
|
删除
|
|
</view>
|
|
<view @tap="delDZD(item)" v-if="userType == 0 && isDownKH == false &&item.billSaleDetailVos == null && (item.dealingsType == 6 || (item.dealingsType == 7 && item.delFlag == 1))" style="position: absolute;top: 116rpx;right: 17rpx;width: 100rpx;height: 60rpx;background: #088FEB;color: #fff;text-align: center;line-height: 60rpx;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">
|
|
货号
|
|
</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.totalAmount / item1.productCount}}</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 v-if="item.dealingsType == 9">退货金额:{{item.shouldPay == null ?"0" :item.shouldPay}}</text>
|
|
<text v-else>拿货金额:{{item.shouldPay == null ?"0" :item.shouldPay}}</text>
|
|
</view>
|
|
</view>
|
|
<view style="padding-left: 20rpx;margin-top: 40rpx;">
|
|
<view>
|
|
余额抵进货:{{item.balanceDeductionAmount == null ?"0" :item.balanceDeductionAmount}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<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.shouldPay == null ?"0" :item.shouldPay}}</text>
|
|
<text
|
|
style="display: inline-block;padding-left: 20rpx;flex: 1;">本单实付:{{item.alreadyPay == null ?"0" :item.alreadyPay}}</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?'撤销欠款':item.dealingsType == 9?'本单退款':'本单欠款'}}</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?'撤销余额':item.dealingsType == 9?'本单退款':'本单余额'}}</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-th align="center" width="70">利润</uni-th> -->
|
|
</uni-tr>
|
|
<!-- 表格数据行 -->
|
|
<uni-tr v-for="(item1,index1) in item.supplierBuySaleVos" :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.supplierBuyProductDetailLogVos[0].realPrice * item1.productCount}}</uni-td> -->
|
|
<uni-td
|
|
align="center">{{userType == 0 ?(item1.supplierBuyProductDetailLogVos[0].purchasePrice == null?0:item1.supplierBuyProductDetailLogVos[0].purchasePrice):0}}</uni-td>
|
|
<uni-td align="center">{{item1.productCount * item1.supplierBuyProductDetailLogVos[0].purchasePrice || 0}}</uni-td>
|
|
<!-- <uni-td align="center">{{userType == 0 && isDownKH == false?((item1.supplierBuyProductDetailLogVos[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>
|
|
<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" />
|
|
<!-- 弹出销售商品规格 -->
|
|
<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>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return {
|
|
list: [],
|
|
range: [],
|
|
GDList: [],
|
|
status: 'loadmore',
|
|
pages: 1,
|
|
pageNum: 1,
|
|
userId: '',
|
|
shopId: '',
|
|
duizhangRecords: [],
|
|
detailList: {},
|
|
duizhangList: {},
|
|
type: '',
|
|
isDownKH: false,
|
|
userType: uni.getStorageSync('type'),
|
|
items: ['对账单', '拿货(按订单)', '拿货(按商品)', '退货明细'],
|
|
itemsGYS: ['对账单', '拿货(按订单)', '拿货(按商品)'],
|
|
current: 1,
|
|
shopName: ""
|
|
}
|
|
},
|
|
filters: {
|
|
sliceMsg(val) {
|
|
var name = ''
|
|
if (typeof(val) == 'string') {
|
|
let newObj = JSON.parse(val)
|
|
for (let as in newObj) {
|
|
name += newObj[as] + '/'
|
|
}
|
|
}
|
|
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: this.shopName + '的对账单',
|
|
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.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
|
|
}
|
|
uni.setNavigationBarTitle({
|
|
title: this.shopName
|
|
});
|
|
this.getList()
|
|
},
|
|
onReachBottom() {
|
|
if (this.pageNum >= this.pages) return;
|
|
this.status = 'loading';
|
|
this.pageNum++;
|
|
if (this.current == 0) {
|
|
this.duizhangdan()
|
|
} else {
|
|
this.getList();
|
|
}
|
|
},
|
|
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]
|
|
},
|
|
delDZD(item){
|
|
let that = this;
|
|
uni.showModal({
|
|
title: "提示",
|
|
content: "确定删除此条数据吗?",
|
|
success: function(res) {
|
|
uni.showLoading({
|
|
title: '加载中...'
|
|
})
|
|
if (res.confirm) {
|
|
that.tui.request('/app/dealingRecord/deleteDealingsRecord', "post", {
|
|
id:item.id
|
|
}, false, true).then((res) => {
|
|
if (res.code == 200) {
|
|
that.tui.toast('删除成功')
|
|
that.duizhangList = []
|
|
that.pageNum = 1
|
|
that.pages = 1
|
|
that.duizhangdan()
|
|
} else {
|
|
that.tui.toast(res.message)
|
|
}
|
|
}).catch((res) => {})
|
|
}
|
|
setTimeout(res1 => {
|
|
uni.hideLoading();
|
|
}, 500)
|
|
}
|
|
})
|
|
|
|
},
|
|
duizhangdan() {
|
|
var url,data
|
|
if(this.type == 'gysName'){
|
|
url = '/app/bill/getSupplierBill'
|
|
data = {
|
|
supplierId:this.userId,
|
|
shopId:this.shopId,
|
|
pageNum:this.pageNum,
|
|
startDate: this.range[0],
|
|
endDate: this.range[1],
|
|
pageSize:"10"
|
|
}
|
|
}else{
|
|
url = "/app/bill/getCustomerBill"
|
|
data = {
|
|
customerId: this.userId,
|
|
pageNum: this.pageNum,
|
|
pageSize: '10',
|
|
startDate: this.range[0],
|
|
endDate: this.range[1],
|
|
shopId: this.shopId
|
|
}
|
|
}
|
|
this.tui.request(url, "post", data, false, false).then((res) => {
|
|
if (res.code == 200) {
|
|
this.status = 'nomore';
|
|
if(this.type == 'gysName'){
|
|
if (this.pages == 1) {
|
|
this.duizhangList = res.result
|
|
this.duizhangRecords = res.result.supplierBillSaleVos.records
|
|
} else {
|
|
for (let i = 0; i < res.result.supplierBillSaleVos.records.length; i++) {
|
|
this.duizhangRecords.push(res.result.supplierBillSaleVos.records[i])
|
|
}
|
|
}
|
|
this.pages = res.result.supplierBillSaleVos.pages
|
|
}else{
|
|
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') {
|
|
if(this.type == 'gysName'){
|
|
console.log('item',item)
|
|
this.GDList = item.supplierBuyProductDetailLogVos
|
|
}else{
|
|
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
|
|
if (this.type == 'gysName') {
|
|
if(this.current == 1){
|
|
url = "/app/purchase/getPurchaseListOfSupplier"
|
|
data = {
|
|
supplierId: this.userId,
|
|
pageSize: 10,
|
|
pageNum: this.pageNum,
|
|
startDate:this.range[0],
|
|
endDate:this.range[1]
|
|
}
|
|
}else if(this.current == 2){
|
|
url = "/app/sale/getSupplierBuyProductLog"
|
|
data = {
|
|
supplierId: this.userId,
|
|
pageSize: 10,
|
|
pageNum: this.pageNum,
|
|
shopId: this.shopId,
|
|
startDate:this.range[0],
|
|
endDate:this.range[1]
|
|
}
|
|
}
|
|
|
|
} else {
|
|
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) => {
|
|
this.status = 'nomore';
|
|
if (res.code == 200) {
|
|
// this.list = res.result.records
|
|
if (this.pages == 1) {
|
|
this.list = res.result.records
|
|
} else {
|
|
this.list = [...this.list, ...res.result.records]
|
|
|
|
}
|
|
this.pages = res.result.pages
|
|
if (this.current == 1) {
|
|
if(this.type == 'gysName'){
|
|
for (let i = 0; i < this.list.length; i++) {
|
|
this.list[i].purchase.productCount = 0
|
|
for (let j = 0; j < this.list[i].purchaseDetails.length; j++) {
|
|
for (let m = 0; m < this.list[i].purchaseDetails[j].stockLogList1
|
|
.length; m++) {
|
|
this.list[i].purchase.productCount += this.list[i]
|
|
.purchaseDetails[j].stockLogList1[m].productCount
|
|
}
|
|
}
|
|
}
|
|
}else{
|
|
for (let i = 0; i < this.list.length; i++) {
|
|
this.list[i].productCount = 0
|
|
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].productCount += this.list[i]
|
|
.saleDetailDTOList[j].stockLogList1[m].productCount
|
|
this.list[i].saleDetailDTOList[j].productCount += this.list[i]
|
|
.saleDetailDTOList[j].stockLogList1[m].productCount
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
this.$forceUpdate()
|
|
} else if (this.current == 2) {
|
|
if(this.type == 'gysName'){
|
|
for (let i = 0; i < this.list.length; i++) {
|
|
this.list[i].productCount = 0
|
|
for (let j = 0; j < this.list[i].supplierBuySaleVos.length; j++) {
|
|
this.list[i].supplierBuySaleVos[j].productCount = 0
|
|
|
|
for (let m = 0; m < this.list[i].supplierBuySaleVos[j]
|
|
.supplierBuyProductDetailLogVos.length; m++) {
|
|
this.list[i].productCount += this.list[i].supplierBuySaleVos[j]
|
|
.supplierBuyProductDetailLogVos[m].productCount
|
|
this.list[i].supplierBuySaleVos[j].productCount += this.list[i]
|
|
.supplierBuySaleVos[j].supplierBuyProductDetailLogVos[m]
|
|
.productCount
|
|
}
|
|
}
|
|
}
|
|
this.$forceUpdate()
|
|
}else{
|
|
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 if (this.current == 3) {
|
|
if(this.type == 'gysName'){
|
|
// for (let i = 0; i < this.list.length; i++) {
|
|
// this.list[i].productCount = 0
|
|
// for (let j = 0; j < this.list[i].supplierBuySaleVos.length; j++) {
|
|
// this.list[i].supplierBuySaleVos[j].productCount = 0
|
|
|
|
// for (let m = 0; m < this.list[i].supplierBuySaleVos[j]
|
|
// .supplierBuyProductDetailLogVos.length; m++) {
|
|
// this.list[i].productCount += this.list[i].supplierBuySaleVos[j]
|
|
// .supplierBuyProductDetailLogVos[m].productCount
|
|
// this.list[i].supplierBuySaleVos[j].productCount += this.list[i]
|
|
// .supplierBuySaleVos[j].supplierBuyProductDetailLogVos[m]
|
|
// .productCount
|
|
// }
|
|
// }
|
|
// }
|
|
// this.$forceUpdate()
|
|
}else{
|
|
for (let i = 0; i < this.list.length; i++) {
|
|
|
|
for (let j = 0; j < this.list[i].returnSaleDetailList.length; j++) {
|
|
|
|
|
|
this.list[i].returnSaleDetailList[j].productCount = 0
|
|
for (let m = 0; m < this.list[i].returnSaleDetailList[j]
|
|
.stockLogList1.length; m++) {
|
|
this.list[i].returnSaleDetailList[j].productCount += this.list[i]
|
|
.returnSaleDetailList[j].stockLogList1[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>
|
|
|
|
<style lang="scss">
|
|
.uni-card__header-box {
|
|
text-align: center !important;
|
|
}
|
|
|
|
.uni-card__header-content-title {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.container {
|
|
|
|
.boxbg {
|
|
padding-top: 10rpx;
|
|
background-color: #FAF7F7;
|
|
}
|
|
|
|
.tui-order-item {
|
|
.u-collapse-content {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
line-height: 30px;
|
|
}
|
|
|
|
|
|
.tui-goods-info {
|
|
width: 100%;
|
|
box-sizing: border-box;
|
|
background: #fff;
|
|
line-height: 26px;
|
|
border-top: 10px solid #eee;
|
|
|
|
.tui-price-flex {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.tui-size32 {
|
|
font-size: 32rpx;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.tui-size-24 {
|
|
font-size: 24rpx;
|
|
}
|
|
|
|
.tui-price-large {
|
|
font-size: 32rpx;
|
|
|
|
.lineText {
|
|
text-decoration: line-through;
|
|
font-size: 12px;
|
|
color: #888;
|
|
}
|
|
}
|
|
|
|
.tui-flex-shrink {
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.tui-goods-price {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: flex-end;
|
|
justify-content: flex-end;
|
|
font-size: 24rpx;
|
|
}
|
|
|
|
.tui-primary-color {
|
|
color: #EB0909;
|
|
}
|
|
|
|
.tui-pbtm20 {
|
|
padding-bottom: 20rpx;
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
.tui-tabbar {
|
|
width: 100%;
|
|
height: 98rpx;
|
|
background: #fff;
|
|
position: fixed;
|
|
left: 0;
|
|
bottom: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
font-size: 26rpx;
|
|
box-shadow: 0 0 1px rgba(0, 0, 0, .3);
|
|
padding-bottom: env(safe-area-inset-bottom);
|
|
z-index: 996;
|
|
}
|
|
|
|
.tui-btn-mr {
|
|
width: 130rpx;
|
|
height: 60rpx;
|
|
background: #088FEB;
|
|
color: #fff;
|
|
border-radius: 10px;
|
|
line-height: 60rpx;
|
|
text-align: center;
|
|
margin-right: 30rpx;
|
|
}
|
|
|
|
.shop-box {
|
|
margin: 0 auto;
|
|
position: relative;
|
|
}
|
|
|
|
.shop-name {
|
|
width: 100%;
|
|
height: 200rpx;
|
|
line-height: 80rpx;
|
|
border-top: 1px solid #eee;
|
|
border-bottom: 1px solid #eee;
|
|
font-size: 28rpx;
|
|
font-weight: bold;
|
|
display: flex;
|
|
|
|
.uni-icons {
|
|
color: #088FEB !important;
|
|
}
|
|
}
|
|
|
|
.shop-productName {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
padding-left: 20rpx;
|
|
}
|
|
|
|
.shop-productName view {
|
|
height: 55rpx;
|
|
}
|
|
|
|
.shop-collapse {
|
|
display: flex;
|
|
height: 80rpx;
|
|
font-size: 26rpx;
|
|
line-height: 80rpx;
|
|
}
|
|
|
|
.shop-collapse text {
|
|
flex: 1;
|
|
text-align: center;
|
|
padding-right: 40rpx;
|
|
border-right: 1px solid #eee;
|
|
}
|
|
|
|
.content-list {
|
|
width: 95%;
|
|
margin: 0 auto;
|
|
display: flex;
|
|
height: 80rpx;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.content-list:last-child {
|
|
border-bottom: none;
|
|
height: auto;
|
|
}
|
|
|
|
.list-name {
|
|
width: 200rpx;
|
|
text-align: left;
|
|
line-height: 40px;
|
|
height: 80rpx;
|
|
padding-left: 20rpx;
|
|
}
|
|
|
|
.list-val {
|
|
width: 560rpx;
|
|
height: 80rpx;
|
|
line-height: 80rpx;
|
|
}
|
|
|
|
.list-val input {
|
|
width: 400rpx;
|
|
height: 60rpx;
|
|
display: inline-block;
|
|
line-height: 60rpx;
|
|
float: left;
|
|
margin-top: 10rpx;
|
|
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>
|