姜永辉 1 год назад
Родитель
Сommit
ee77fa6cb3

+ 4 - 0
api/pages/report/report.js

@@ -29,6 +29,10 @@ module.exports = {
     getPurDetailReport: 'get_pur_detail_report',
     // 销售明细表
     getSalesItemReport: 'get_sales_item_report',
+    // 收发存汇总表
+    getIvtSumReport: 'get_ivt_sum_report',
+    // 收发存汇总表-明细
+    getIvtItemReport: 'get_ivt_item_report',
   },
   routeUrl: {
     report: {

+ 2 - 0
app.json

@@ -94,6 +94,8 @@
             "name": "package-inventory",
             "pages": [
                 "pages/ivt-detail-report/ivt-detail-report",
+                "pages/ivt-sum-report/ivt-sum-report",
+                "pages/ivt-sum-report/detail/detail",
                 "pages/choose-product/choose-product",
                 "pages/warehousing-processing/warehousing-processing",
                 "pages/warehousing-processing/detail/detail",

+ 21 - 11
components/dkbase/dk-list-report/dk-list-report.js

@@ -14,13 +14,13 @@ Component({
     titleCorner: {
       type: String,
     },
-   
+
     // 标题图标
     titleImage: {
       type: String,
       value: 'Vector.png'
     },
-    statusImageFlag: { 
+    statusImageFlag: {
       //-作废 收款显示隐藏
       type: Boolean,
       value: false
@@ -55,7 +55,7 @@ Component({
       type: Boolean,
       value: true
     },
-    flgValidOnFlag:{ //默认显示启用
+    flgValidOnFlag: { //默认显示启用
       type: Boolean,
       value: true
     },
@@ -150,13 +150,21 @@ Component({
       type: Boolean,
       value: false
     },
+    contentCardTwoFlg: { //内容是否两个
+      type: Boolean,
+      value: false
+    },
+    reportNameKey: { //默认跟踪报表
+      type: String,
+      value:'track'
+    },
   },
 
   /**
    * 组件的初始数据
    */
   data: {
-    imageUrl:config.image_url + '/static/img/',
+    imageUrl: config.image_url + '/static/img/',
     $t: app.globalData.lang,
     routeUrl: app.globalData['routeUrl'],
     item: null,
@@ -171,9 +179,9 @@ Component({
      * @author : 周兴
      * @date   : 2024/4/25 11:46
      */
-    showTip(e){
+    showTip(e) {
       let item = e.currentTarget.dataset.item
-      if(item.tip){
+      if (item.tip) {
         wx.showToast({
           title: item.tip,
           icon: 'none',
@@ -195,7 +203,7 @@ Component({
      * @author : 周兴
      * @date   : 2024/2/19 11:46
      */
-    _chooseData(index){
+    _chooseData(index) {
       let list = this.data.list;
       if (list && list[index]) {
         list[index].checked = !list[index].checked
@@ -204,8 +212,10 @@ Component({
         list: list
       })
       // 勾选数据
-      this.triggerEvent("choose", { item:list[index],
-         list: list.filter(it=>it.checked) ,checked:list[index].checked})
+      this.triggerEvent("choose", {
+        item: list[index],
+        list: list.filter(it => it.checked), checked: list[index].checked
+      })
     },
     /**
     * @desc   : 打电话
@@ -231,9 +241,9 @@ Component({
      */
     toDetail(e) {
       // 相当于勾选
-      if(this.data.chooseFlag){
+      if (this.data.chooseFlag) {
         this.chooseData(e);
-      }else{
+      } else {
         this.triggerEvent("toDetail", { item: e.currentTarget.dataset.item })
       }
     },

+ 30 - 2
components/dkbase/dk-list-report/dk-list-report.wxml

@@ -1,7 +1,33 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <view wx:for="{{list}}" data-item="{{item}}" wx:key="index" class="main-class">
   <view class="main-foot" style="position: relative;">
-    <view class="table-content" catchtap="toDetail" data-item="{{item}}" data-index="{{index}}">
+    <!-- 收发存汇总表的 -->
+    <view wx:if="{{reportNameKey == 'ivt'}}" class="goods-cell-class goods-item-class" catchtap="toDetail" data-item="{{item}}" data-index="{{index}}">
+      <view>
+        <van-image radius="15rpx" custom-class="goods-item-image" 
+        fit="fill" src="{{item.imagesUrl}}" />
+      </view>
+      <view style="margin-left: 26rpx;width: 100%; ">
+        <!-- 标题 -->
+        <view>
+          <dk-title titleTag="{{item.shortName}}" title="{{item.skuModel}}"></dk-title>
+        </view>
+        <!-- 描述 -->
+        <view style="display: flex;padding-top: 10rpx;">
+          <dk-text fontSize="24rpx" value="{{item.skuName}}" data-item="{{item}}" ></dk-text>
+        </view>
+        <view style="display: flex;align-items: flex-end;margin-top:20rpx;">
+          <!-- 仓库-->
+          <view style="width: 85%;">             
+            <view  style="margin-top: 30rpx;">              
+              <dk-text fontSize="28rpx" value="{{item.whName}}" data-item="{{item}}" ></dk-text>
+            </view> 
+          </view>          
+        </view>
+      </view>
+    </view>
+    <!-- 跟踪表用的  -->
+    <view wx:if="{{reportNameKey == 'track'}}" class="table-content" catchtap="toDetail" data-item="{{item}}" data-index="{{index}}">
       <!-- 标题行 -->
       <view class="table-content-row">
         <view class="table-content-row-title-two">
@@ -32,9 +58,11 @@
         </view>
       </view>
     </view>
+
+
     <!-- 内容 -->
     <view style="display: flex;flex-wrap: wrap;justify-content: center;">
-      <view wx:if="{{!contentCol}}" class="card-class" wx:for="{{content}}" wx:for-item="col" data-item="{{col}}">
+      <view wx:if="{{!contentCol}}" class="{{contentCardTwoFlg?'card-class_four':'card-class'}}"   wx:for="{{content}}" wx:for-item="col" data-item="{{col}}">
         <image src="{{imageUrl + col.image + '.png'}} " class="card-bottom-image" />
         <view style="position: absolute;z-index: 1;width: 98%;">
           <view class="card-label-class" catchtap="showTip" data-item="{{col}}">{{col.label}}

+ 30 - 0
components/dkbase/dk-list-report/dk-list-report.wxss

@@ -88,6 +88,14 @@
   border-radius: 19rpx;
 }
 
+.card-class_four {
+  position: relative;
+  margin: 15rpx 0.4% 15rpx 1.25%;
+  width: 48%;
+  height: 136rpx;
+  border-radius: 19rpx;
+}
+
 .card-label-class {
   margin-top: 20rpx;
   color: #606EB2;
@@ -96,4 +104,26 @@
   display: flex;
   justify-content: center;
   align-items: center;
+}
+
+
+/**产品条目的样式**/
+.goods-item-class {
+  display: flex;
+  text-align: left;
+  padding-top: 20rpx;
+}
+
+.goods-cell-class {
+  margin: 32rpx 32rpx 32rpx 0rpx;
+  padding: 15rpx 15rpx 15rpx 5rpx !important; 
+  border-radius: 16rpx;
+}
+
+/**产品条目的图片**/
+.goods-item-image {
+  width: 170rpx;
+  height: 170rpx;
+  left: 6rpx;
+  top: calc((100% - 166rpx)/2);
 }

+ 54 - 0
package-inventory/pages/ivt-sum-report/detail/detail.js

@@ -0,0 +1,54 @@
+const mixins = require('@/mixins/index.js')
+const Constants = require('@/utils/Constants.js');
+const app = getApp()
+Page({
+  mixins: [mixins],
+    /**
+     * 页面的初始数据
+     */
+    data: {
+    // 路由
+    routeObjName: 'saleReport',
+    saleList:[],
+    saleReturnList:[],
+    saleOutList:[],
+    },
+  /**
+   * @desc : 查询
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  getData() {
+    return this.excute(this.data.service, this.data.service.getSalesTrackingReportDetail+'/'+ this.data.item.orderId, {}).then(res=>{
+      console.log(res)
+      if(res.data.code == 200 ){
+        let formData = JSON.parse(this.data.formData)
+        if(res.data.data && res.data.data.length > 0){
+          let saleList =  res.data.data.filter(item=>{
+            return item.type== '销售订单'
+          })
+          let saleOutList =  res.data.data.filter(item=>{
+            return item.type== '销售出库'
+          })
+          let saleReturnList =  res.data.data.filter(item=>{
+            return item.type== '销售退货'
+          })
+          this.setData({
+            saleList:saleList,
+            saleOutList:saleOutList,
+            saleReturnList:saleReturnList
+          })
+        }
+  
+      }
+    })
+  },
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    loadInit() {
+      console.log()
+      this.getData()
+    },
+
+})

+ 4 - 0
package-inventory/pages/ivt-sum-report/detail/detail.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "收发存明细"
+}

+ 77 - 0
package-inventory/pages/ivt-sum-report/detail/detail.wxml

@@ -0,0 +1,77 @@
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+<view>
+
+  <view class="detail-top">
+    <image class="scan-image" fit="fill" src="{{imageUrl+'/detail_sale_order.png'}}"></image>
+    <view class="detail-top-sup" style="display: flex;">
+      <view style="width: 15%;">
+        <image class="scan-image-icon" fit="fill" src="{{imageUrl+'/order_billing_detail_01.png'}}"></image>
+      </view>
+
+      <view>
+        <view style="display: flex;">
+          <view>
+            {{item.cusName}}
+          </view>
+          <view style="padding-left: 20rpx;">
+            {{item.cusPhone}}
+          </view>
+        </view>
+
+
+
+        <view style="z-index: 2;padding-top: 20rpx;">
+          {{ wxmlUtil.addressToIndexOf(item.addressFull)}}
+        </view>
+        <view style="display: flex;padding-top: 20rpx;font-weight: 500;">
+          <view>
+            {{item.staffName}}
+          </view>
+          <view style="padding-left: 20rpx;">|</view>
+          <view style="padding-left: 20rpx;">
+            {{item.orgName}}
+          </view>
+        </view>
+        <view style="z-index: 10;padding-top: 40rpx;font-size: 24rpx;font-weight: 400;">
+          销售日期:{{ wxmlUtil.formatDate(item.makeTime)}}
+        </view>
+      </view>
+
+    </view>
+
+
+  </view>
+
+
+  <view style="display: flex;padding:10rpx;  margin: 10px 22rpx 10px 22rpx;margin-top: 10px;border-radius: 15rpx;">
+    <view style="background-color:#F4F9FF;width:25%;padding:10rpx;border-radius: 16rpx;">
+      <view style="font-size:13px;text-align: center;margin-top: 10rpx;">订单数量</view>
+      <dk-cell left="0rpx" center="center" fontSize="13" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" amount="{{false}}" content="{{item.sumQuantity}}"></dk-cell>
+    </view>
+    <view style="background-color:#F4F9FF;width: 25%;padding:10rpx;border-radius: 16rpx;margin-left: 20rpx;">
+      <view style="font-size:13px;text-align: center;margin-top: 10rpx;">销售出库</view>
+      <dk-cell left="0rpx" center="center" fontSize="15" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" amount="{{false}}" content="{{item.outQty}}"></dk-cell>
+    </view>
+
+    <view style="background-color:#F4F9FF;width:25%;padding:10rpx;border-radius: 16rpx;">
+      <view style="font-size:13px;text-align: center;margin-top: 10rpx;">退货数量</view>
+      <dk-cell left="0rpx" center="center" fontSize="13" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" amount="{{false}}" content="{{item.returnQty}}"></dk-cell>
+    </view>
+    <view style="background-color:#F4F9FF;width: 25%;padding:10rpx;border-radius: 16rpx;margin-left: 20rpx;">
+      <view style="font-size:13px;text-align: center;margin-top: 10rpx;">销售回库</view>
+      <dk-cell left="0rpx" center="center" fontSize="15" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" amount="{{false}}" content="{{0}}"></dk-cell>
+    </view>
+  </view>
+
+
+
+  <dk-goos-list type="sale" list="{{saleList}}" title="商品明细" titleCol="skuName" titleTagCol="brandName" descCol="skuCode" priceCol="priceSale" sumAmountCol="sumAmount" sumQuantity="sumQuantity" quantityCol="itemQty"></dk-goos-list>
+
+  <dk-goos-list list="{{saleOutList}}" no="no" title="销售出库" titleCol="skuName" titleTagCol="brandName" descCol="skuCode" priceCol="priceSale" quantityCol="itemQty"></dk-goos-list>
+
+  <dk-goos-list list="{{saleReturnList}}" no="no" title="销售退货" titleCol="skuName" titleTagCol="brandName" descCol="skuCode" priceCol="priceSale" quantityCol="itemQty"></dk-goos-list>
+
+
+
+
+</view>

+ 84 - 0
package-inventory/pages/ivt-sum-report/detail/detail.wxss

@@ -0,0 +1,84 @@
+page {
+	background: #FFFFFF;
+  }
+  .detail-top {
+	position: relative;
+	border: 1px solid #F3FBFF;
+	margin: 10px 32rpx 10px 32rpx;
+	background-color: #FFFF;
+	background: radial-gradient(61.26% 65.52% at 6.12% 18.49%, #CDD8FF 0%, #F3FAFF 100%);
+	padding: 20rpx;
+	border-radius: 16rpx;
+  }
+  
+  .dk-card-outer-class-1 {
+	margin: 10px 32rpx 10px 32rpx;
+	margin-top: 10px;
+	border-radius: 15rpx;
+	/* box-shadow: 2px 2px 5px #e5e5e6; */
+  }
+  
+  .detail-top-sup {
+	color: #002340;
+	font-weight: bold;
+	font-size: 28rpx;
+	padding: 10rpx;
+  }
+  
+  .detail-top-color {
+	font-weight: bold;
+	color: #002340;
+	font-size: 14px;
+	padding: 10rpx;
+  }
+  .scan-image-icon {
+	width: 40rpx;
+	height: 40rpx;
+  }
+  
+  .scan-image-icon-3{
+	width: 96rpx;
+	height: 96rpx;
+	position: absolute;
+	right: 0;
+	bottom: 0;
+	border-radius: 0px 0px 16rpx 0px;
+  }
+  .scan-image {
+	width: 200rpx;
+	height: 200rpx;
+	position: absolute;
+	right: 0;
+	bottom: 0;
+	border-radius: 0px 0px 16rpx 0px;
+  }
+  .edit-image{
+	width: 50rpx;
+	height: 50rpx;
+	position: absolute;
+	right: 30rpx;
+	top: 20rpx;
+	border-radius: 0px 0px 16rpx 0px;
+  }
+  
+  .tags-class{
+	margin: 20rpx;
+	/* text-align: center; */
+	display: flex;
+	justify-content: center;
+  }
+  .dk-card-outer-class-1 {
+	margin: 10px 32rpx 10px 32rpx;
+	margin-top: 10px;
+	border-radius: 15rpx;
+	/* box-shadow: 2px 2px 5px #e5e5e6; */
+  }
+  .btn-add-class {
+	background: #8091A9;
+	border-radius: 50%;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	padding: 20rpx;
+	box-shadow: 0px 17px 22px 0px #1B365D33;
+  }

+ 41 - 0
package-inventory/pages/ivt-sum-report/ivt-sum-report.js

@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright(c) 2022 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:收发存汇总
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		姜永辉		 2024-1-23			1.00		    选品
+ *******************************************************************************/
+const mixins = require('@/mixins/index.js')
+const Constants = require('@/utils/Constants.js');
+const app = getApp()
+Page({
+  mixins: [mixins],
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    // 路由
+    routeObjName: 'report',
+    // 查询条件
+    searchContent: [
+      { code: 'accDate', title: mixins.$t("currentMonth"), defaultValue: 3, searchType: Constants.searchType.date }, 
+    ],
+    // 列表区(内容)
+    contentList: [
+      { label: '期初数量', code: 'openingIvtQty', image: 'order-bg' , },
+      { label: '入库数量', code: 'currentIntoQty', image: 'inbound-bg', },  
+      { label: '出库数量', code: 'currentOutQty', image: 'order-bg' , },
+      { label: '期末数量', code: 'endingIvtQty', image: 'inbound-bg',  },  
+    ],
+  },
+
+  /**
+   * @desc : 查询
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
+   */
+  getData(params) {
+    return this.excute(this.data.service, this.data.service.getIvtSumReport, params);
+  },
+})

+ 4 - 0
package-inventory/pages/ivt-sum-report/ivt-sum-report.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "收发存汇总表"
+}

+ 12 - 0
package-inventory/pages/ivt-sum-report/ivt-sum-report.wxml

@@ -0,0 +1,12 @@
+<!-- 前台导入wxmlUtil.wxs -->
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+<loading wx:if="{{loading}}" ></loading>
+<van-sticky scroll-top="0">
+  <!-- 查询条件 -->
+  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['skuName','skuCode','skuModel'])}}">
+  </dk-dropdown-menu> 
+</van-sticky>
+
+
+<!-- 列表区 -->
+<dk-list-report  list="{{tableData}}" flgSubFormatDate="{{true}}" titleCorner="salesChannelName" title="skuCode"  no="orderNo" statusRight="orderStatusName" colorLeft="#437FF8" colorRight="#F43636"  statusLeft="outStatusName" reportNameKey = "ivt" contentCardTwoFlg="{{true}}" content="{{contentList}}" contentObj="{{contentObj}}"  bind:toDetail="toDetail" bind:toTitle="toTitle" bind:toStatus="toStatus"bind:toPoint="toPoint" routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:open="open"></dk-list-report>

+ 1 - 0
package-inventory/pages/ivt-sum-report/ivt-sum-report.wxss

@@ -0,0 +1 @@
+/* package-inventory/pages/ivt-sum-report/ivt-sum-report.wxss */