Просмотр исходного кода

Merge branch 'master' of http://git.dongkesoft.com:9001/iBOSS-2.0-Mini/iboss_wx_app

zhoux 1 год назад
Родитель
Сommit
84efab4c54

+ 3 - 2
i18n/zh-CN.js

@@ -131,6 +131,7 @@ const ivt = {
   purIntoType: '入库类型-采购入库',
   saleReturnIntoType: '入库类型-采退出库',
   otherIntoType: '入库类型-其他入库',
+  firstIntoType: '入库类型-期初入库',
   purReturnOutType: '出库类型-销退回库',
   saleOutType: '出库类型-销售出库',
   otherOutType: '出库类型-其他出库',
@@ -185,8 +186,8 @@ const ivt = {
   responsibilityInformation: '责任信息',
   batchAdjustment: '批次调整',
   adjustmentType: '调整类型',
-
-
+  outQty: '出库数量',
+  lastQty: '期末数量',
 }
 
 //  首页

+ 8 - 5
package-base-select/pages/select-data/select-data.wxml

@@ -6,7 +6,7 @@
     <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,placeholder)}}">
     </dk-dropdown-menu>
     <!-- 多选 -->
-    <van-tabs wx:if="{{chooseFlag}}" type="card" custom-class="tags-class" tab-active-class="{{active==0?'dk-tab-active-left':'dk-tab-active-right'}}" animated="{{true}}" swipeable="{{true}}" active="{{ active }}" dot bind:change="changeTag">
+    <van-tabs wx:if="{{chooseFlag}}" type="card" tab-active-class="{{active==0?'dk-tab-active-left':'dk-tab-active-right'}}" animated="{{true}}" swipeable="{{true}}" active="{{ active }}" dot bind:change="changeTag">
       <van-tab title="待选列表"></van-tab>
       <van-tab title="已选列表" info="{{choosedData.length==0?'':choosedData.length}}"></van-tab>
     </van-tabs>
@@ -19,13 +19,16 @@
 
 <!--简单列表-->
 <view wx:if="{{simpleFlag}}" style="margin-top:30rpx;">
-  <view wx:for="{{tableData}}" data-item="{{item}}" wx:key="index" class="main-class main-item-class" style="{{item.checked? 'border: 1px solid #1B365D;':''}}" data-index="{{index}}"  catchtap="choose">
+  <view wx:for="{{tableData}}" data-item="{{item}}" wx:key="index" class="main-class main-item-class" style="{{item.checked? 'border: 1px solid #1B365D;':''}}" data-index="{{index}}" catchtap="choose">
     {{item[title]}}
   </view>
 </view>
 
-<!-- 列表区 -->
-<dk-list wx:if="{{!simpleFlag && active == 0}}" id="list" list="{{tableData}}" title="{{title}}" flgPoint="{{false}}" titleImageFlag="{{false}}" content="{{contentList}}" footerInfo="{{footerInfo}}" chooseFlag="{{chooseFlag}}" bind:toDetail="toDetail" bind:choose="chooseData"></dk-list>
+<!-- 列表区 防止遮住-->
+<view style="{{chooseFlag?'margin-top:120rpx;':''}}">
+  <dk-list wx:if="{{!simpleFlag && active == 0}}" id="list" list="{{tableData}}" title="{{title}}" flgPoint="{{false}}" titleImageFlag="{{false}}" content="{{contentList}}" footerInfo="{{footerInfo}}" chooseFlag="{{chooseFlag}}" bind:toDetail="toDetail" bind:choose="chooseData"></dk-list>
+</view>
+
 
 <!-- 已选列表区 -->
 <dk-list wx:if="{{ !simpleFlag && chooseFlag && active == 1}}" id="choosed" list="{{choosedData}}" title="{{title}}" flgPoint="{{false}}" titleImageFlag="{{false}}" content="{{contentList}}" footerInfo="{{footerInfo}}" swipeDisabled="{{false}}" swipeDeleteFlag="{{true}}" bind:swipe="delChoosed"></dk-list>
@@ -43,5 +46,5 @@
 </view>
 
 
-<dk-popup id="popup" type="basic" validFlag="{{true}}" priceTitle=""  title="{{popTitle}}" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjNamePop}}" contentObj="{{popContent}}" bind:commit="editItems">
+<dk-popup id="popup" type="basic" validFlag="{{true}}" priceTitle="" title="{{popTitle}}" value="{{dataItem}}" show="{{showPop}}" routeObjName="{{routeObjNamePop}}" contentObj="{{popContent}}" bind:commit="editItems">
 </dk-popup>

+ 1 - 2
package-base-select/pages/select-data/select-data.wxss

@@ -31,8 +31,7 @@
 .tags-class>van-sticky {
 	position: fixed !important;
 	width: 100%;
-	height: 84rpx !important;
-	z-index: 99;
+	height: 84rpx !important; 
 	top: 104rpx;
 }
 

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

@@ -3,20 +3,20 @@
 <!-- 期初 入库 出库 期末 -->
 <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>
+    <view style="font-size:13px;text-align: center;margin-top: 10rpx;">{{$t["openingInventoryQty"]}}</view>
     <dk-cell left="0rpx" center="center" fontSize="13" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" amount="{{false}}" content="{{item.openingIvtQty}}"></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>
+    <view style="font-size:13px;text-align: center;margin-top: 10rpx;">{{$t["inventoryQty"]}}</view>
     <dk-cell left="0rpx" center="center" fontSize="15" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" amount="{{false}}" content="{{item.currentIntoQty}}"></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>
+  <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;">{{$t["outQty"]}}</view>
     <dk-cell left="0rpx" center="center" fontSize="13" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" amount="{{false}}" content="{{item.currentOutQty}}"></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>
+    <view style="font-size:13px;text-align: center;margin-top: 10rpx;">{{$t["lastQty"]}}</view>
     <dk-cell left="0rpx" center="center" fontSize="15" contentFontSize="18" contentColor="#1B365D" spaceWidth="0" contentFontWeight="700" amount="{{false}}" content="{{item.endingIvtQty}}"></dk-cell>
   </view>
 </view>

+ 11 - 7
package-inventory/pages/ivt-sum-report/ivt-sum-report.js

@@ -44,6 +44,10 @@ Page({
       accDateStart: params.accDateStart,
       accDateEnd: params.accDateEnd,
     })
+    params.querys = JSON.stringify({
+      accDateStart: params.accDateStart,
+      accDateEnd: params.accDateEnd,
+    })
     return params;
   },
 
@@ -56,11 +60,11 @@ Page({
     return this.excute(this.data.service, this.data.service.getIvtSumReport, params);
   },
 
-/**
- * @desc : 处理接口返回数据
- * @date : 2024/2/1 15:49
- * @author : 姜永辉
- */
+  /**
+   * @desc : 处理接口返回数据
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
+   */
   handleSearchData(tableData) {
     //处理图片
     if (tableData && tableData.length > 0) {
@@ -92,8 +96,8 @@ Page({
           formMode: Constants.formMode.index
         }
         e.detail.item.button = button
-        e.detail.item.accDateStart =  this.data.accDateStart
-        e.detail.item.accDateEnd =  this.data.accDateEnd
+        e.detail.item.accDateStart = this.data.accDateStart
+        e.detail.item.accDateEnd = this.data.accDateEnd
       }
       e.detail.name = 'editIvtSum'
     }

+ 1 - 1
package-inventory/pages/ivt-sum-report/ivt-sum-report.wxml

@@ -3,7 +3,7 @@
 <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 model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['skuName','skuModel'])}}">
   </dk-dropdown-menu>
 </van-sticky>
 

+ 89 - 10
package-inventory/pages/warehousing-processing/detail/detail.js

@@ -38,12 +38,19 @@ Page({
         contentObj: {},
         popContent: [
             {
-                code: 'intoingQty',
+                code: 'itemQty',
                 type: 'step',
                 title: mixins.$t('count'),
             },
             { code: 'packageBox', type: 'packageBox', title: mixins.$t("packageBox"), },
             {
+                code: 'priceInto',
+                type: 'number',
+                title: mixins.$t("inboundPrice"),
+                required: true,
+                readonly: true,
+            },
+            {
                 code: 'whId',
                 name: 'whName',
                 title: mixins.$t('warehouseId'),
@@ -184,6 +191,7 @@ Page({
                 element.box = element.intoingBox
                 element.piece = element.intoingPiece
             }
+            element.sumPrice = element.priceInto * element.itemQty
             if (data.whId) {
                 element.whId = data.whId
                 element.whName = data.whName
@@ -248,10 +256,28 @@ Page({
         let totalAmout = Number(0)
         let totalQuantity = Number(0)
         // 各个明细的金额数量
-        formData.goodsList.forEach(element => {  //循环出商品总共价格   
-            element.intoingAmt = element.priceInto * element.intoingQty
-            totalAmout += Number(element.priceInto * element.intoingQty)
-            totalQuantity += Number(element.intoingQty)
+        formData.goodsList.forEach(element => {  //循环出商品总共价格  
+            //"入库状态-已入库"   
+            if (formData.intoStatus == Constants.intoStatus.inBounded) {
+                element.intoQty = element.itemQty
+                element.priceInto = element.priceInto ? element.priceInto : element.pricePurchase
+                element.intoAmt = element.priceInto * element.intoQty
+                element.intoingAmt = 0     //  入库中金额
+                element.intoingQty = 0     //  入库中数量
+                totalAmout += Number(element.priceInto * element.intoQty)
+                totalQuantity += Number(element.intoQty)
+            }
+            else {
+                element.intoingQty = element.itemQty
+                element.priceInto = element.priceInto ? element.priceInto : element.pricePurchase
+                element.intoingAmt = element.priceInto * element.intoingQty
+                element.intoAmt = 0     //  已入库金额
+                element.intoQty = 0     //  已入库数量
+                totalAmout += Number(element.priceInto * element.intoingQty)
+                totalQuantity += Number(element.intoingQty)
+            }
+            element.packageBox = element['box'] + element.subUnitName + element['piece'] + element.unitName
+            element.nonStdCode = element.nonStdCode != null ? element.nonStdCode : '-'
         })
         // 左下角的合计金额
         contentList_.forEach(card => {
@@ -264,7 +290,13 @@ Page({
             if (card.name === 'items') {
                 //合计金额
                 card.itemAmt = totalAmout
-                card.intoingQty = totalQuantity
+                card.content = totalQuantity
+                //  入库状态-已入库
+                if (formData.intoStatus == Constants.intoStatus.inBounded) {
+                    card.intoQty = totalQuantity
+                } else {
+                    card.intoingQty = totalQuantity
+                }
             }
         })
         this.setData({
@@ -355,10 +387,10 @@ Page({
             params.intoingQty = formData.goodsList.sum("intoingQty")     //一共的商品数量
             params.intoAmt = 0     //  已入库金额
             params.intoQty = 0     //  已入库数量    
-            formData.goodsList.forEach(item => { 
+            formData.goodsList.forEach(item => {
                 item.intoingBox = item.box
                 item.intoingPiece = item.piece
-            })     
+            })
         }
         params.itemList = formData.goodsList //商品明细
         params.annexPaths = formData.annexPaths || [] //附件 
@@ -468,8 +500,7 @@ Page({
                 cardList,
             })
 
-        } else if (this.data.item.intoType == Constants.intoType.other ||
-            this.data.item.intoType == Constants.intoType.first) {
+        } else if (this.data.item.intoType == Constants.intoType.other) {
             if (this.data.item.intoType == Constants.intoType.first) {
                 // 其他入库
                 wx.setNavigationBarTitle({
@@ -563,6 +594,54 @@ Page({
                 contentObj,
                 cardList,
             })
+        } else if (this.data.item.intoType == Constants.intoType.first) {
+            // 期初入库
+            wx.setNavigationBarTitle({
+                title: mixins.$t('firstInWh'),
+            })
+
+            cardList = [
+                {
+                    name: 'items',
+                    title: mixins.$t('goodsDetail'),
+                    info: '(' + mixins.$t('warehousingProcessing') + ')',
+                    chooseGoodsFlag: false,
+                    color: '#E4002B',
+                    displayNum: 2
+                }, {
+                    name: 'other',
+                    title: mixins.$t('otherInfo')
+                }
+            ]
+            contentObj = {
+
+
+                items: [{
+                    code: 'collectType',
+                    name: 'collectName',
+                    type: 'drop',
+                    dropType: 'collect'
+                }, {
+                    code: 'collectAmount',
+                    type: 'number',
+                    title: mixins.$t('totalAmount'),
+                }],
+
+                other: [{
+                    code: 'remarks',
+                    type: 'textarea',
+                    title: mixins.$t('remarks'),
+                    readonly: false
+                }, {
+                    code: 'file',
+                    type: 'uploader',
+                    title: mixins.$t('uploader')
+                }]
+            }
+            this.setData({
+                contentObj,
+                cardList,
+            })
         } else {
             // 销售退货
             cardList = [{

+ 2 - 2
package-inventory/pages/warehousing-processing/detail/detail.wxml

@@ -2,7 +2,7 @@
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <loading wx:if="{{loading}}"></loading>
 <!-- 蓝色信息相关 -->
-<view wx:if="{{item.intoType != $t['otherIntoType']}}" >
+<view wx:if="{{item.intoType != $t['otherIntoType'] && item.intoType != $t['firstIntoType']}}" >
   <view class="detail-top" data-item="{{item}}">
     <image class="scan-image" fit="fill" src="{{imageUrl+'/detail_sale_order.png'}}"></image>
 
@@ -49,7 +49,7 @@
   </view>
 </view>
 
-<dk-form-bill id="{{formName}}" routeObjName="{{routeObjName}}" readonly="{{item.intoStatus == $t['inBoundedIntoStatus']}}" cardList="{{cardList}}"   titleCol="skuCode" descCol="skuModel" priceCol="priceInto" pupPriceCol="pricePurchase" iconCol="imagesUrl"  quantityCol="{{quantityCol}}" sumAmountCol="itemAmt" sumQuantityCol="{{sumQuantityCol}}" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale" bind:editItems="setGoods" table="{{table}}" bind:delItem="setGoods" bind:setGoods="setGoods" priceTitle="{{$t['wholesalePrice']}}:">
+<dk-form-bill id="{{formName}}" type="purInto"  routeObjName="{{routeObjName}}" readonly="{{item.intoStatus == $t['inBoundedIntoStatus']}}" cardList="{{cardList}}"   titleCol="skuModel" descCol="skuName" priceCol="priceInto" pupPriceCol="sumPrice" iconCol="imagesUrl"  quantityCol="{{quantityCol}}" sumAmountCol="itemAmt" sumQuantityCol="{{sumQuantityCol}}" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale" bind:editItems="setGoods" table="{{table}}" bind:delItem="setGoods" bind:setGoods="setGoods"  >
 </dk-form-bill>
 
 <view style="height: 200rpx;"></view>

+ 4 - 4
package-inventory/pages/warehousing-processing/warehousing-processing.js

@@ -429,8 +429,8 @@ Page({
               {
                 name: 'invaidOrder',
                 title: mixins.$t('invaidOrder'),
-  
-              }, 
+
+              },
             ],
           })
         }
@@ -457,7 +457,7 @@ Page({
     let id = item.intoId
     // 采购入库
     if (item.intoType == Constants.intoType.pur) {
-      this.excute(this.data.service, this.data.service.inBoundCancel, item).then(res => {
+      this.excute(this.data.service, this.data.service.inBoundCancel, { intoId: id }).then(res => {
         if (res.data.code == Constants.SUCESS_CODE) {
           // 重新查询
           this.searchData()
@@ -466,7 +466,7 @@ Page({
     }
     // 其他入库
     else if (item.intoType == Constants.intoType.other) {
-      this.excute(this.data.inboundOtherService, this.data.inboundOtherService.inBoundCancel, item).then(res => {
+      this.excute(this.data.inboundOtherService, this.data.inboundOtherService.inBoundCancel, { intoId: id }).then(res => {
         if (res.data.code == Constants.SUCESS_CODE) {
           // 重新查询
           this.searchData()

+ 14 - 7
package-sales/pages/sales-outbound/add/add.js

@@ -864,7 +864,9 @@ Page({
     }
     formData.orgId = formData.orgId ? formData.orgId : app.globalData.user.orgId
     formData.staffId = formData.staffId ? formData.staffId : app.globalData.user.staffId
+    
     return formData
+
   },
 
 
@@ -981,19 +983,19 @@ Page({
       var currentDate = new Date();
       currentDate.setDate(currentDate.getDate() + 7);
       formData.outDate = util.formatDayTime(currentDate)
-    } else if (this.data.formMode == Constants.formMode.add) {  //新建
-      let formData = JSON.parse(this.data.formData)
+    } else if (this.data.formMode == Constants.formMode.add) {  //新建 
       //购物车 标准版 跳入 销售入库
       let that = this
       const eventChannel = this.getOpenerEventChannel()
       eventChannel.on('params', function (data) {
         console.log('eventChannel',data)
         if (data && data.goodsList && data.goodsList.length > 0) {
-          formData.goodsList = data.goodsList
+          formData = JSON.parse(that.data.formData)
+          formData.goodsList = data.goodsList 
           that.setData({
             formData: JSON.stringify(formData)
-          }) 
-        }})
+          })
+        }}) 
       //详情办理
       wx.setNavigationBarTitle({
         title: mixins.$t('add') + title
@@ -1006,15 +1008,19 @@ Page({
           btnFormData: JSON.stringify(btnFormData)
         })
       }
+   
       //设置显示
-      this.setFlagView()
-      this.setStdAndPro()
+      this.setFlagView()  
+      this.setStdAndPro() 
       //处理默认值  业务员业务部门
       formData = this.setStaffOrg(formData)
+  
       // 设置送货日期 当前日期 加一天
       var currentDate = new Date();
       currentDate.setDate(currentDate.getDate() + 7);
       formData.outDate = util.formatDayTime(currentDate)
+ 
+ 
     } else if (this.data.formMode == Constants.formMode.detail) { //详情
       //详情办理
       wx.setNavigationBarTitle({
@@ -1044,6 +1050,7 @@ Page({
 
       this.getItemDetal(this.data.id, 'saleOutBoundService', 'getOutboundForUpdate')
     }
+   
     this.setData({
       formData: JSON.stringify(formData)
     })

+ 4 - 0
pages/shopping/shopping.js

@@ -457,8 +457,12 @@ Page({
           goodsList: that.data.choosedGoodsList,
           formMode:'add'
         })
+        that.setData({ // 购物车点击结算清空已选
+          choosedGoodsList:[]
+        })
       }
     })
+  
   },
 
   onShow() {