于继渤 před 1 rokem
rodič
revize
ee0761d6c4

+ 2 - 1
api/pages/ivt/saleOutBound.js

@@ -15,7 +15,8 @@ module.exports = {
     outboundUpdate: 'outbound_update',
     handleOutbound: 'handle_outbound',
     getOutboundForUpdate:'get_outbound_for_update',
-    repeal:'repeal'
+    repeal:'repeal',
+    selectByCondDetail:'select_by_cond_detail' //总单带明细
   },
 
   routeUrl: {

+ 18 - 17
package-base-select/pages/select-source-sale-order/select-source-sale-order.js

@@ -24,7 +24,7 @@ Page({
    * @author : 于继渤
    */
   getData(params) {
-    return this.excute(this.data.orderService, this.data.orderService.selectTotalSingleTapeDetailPage, params);
+    return this.excute(this.data.service, this.data.service.selectByCondDetail, params);
   },
   /**
  * @desc : 设置查询参数
@@ -33,7 +33,8 @@ Page({
  */
 setSearchParams(params) {
   //销售状态
-  params.outStatusList = [Constants.outStatus.outBounded]
+  params.outStatus = Constants.outStatus.outBounded
+  params.outType = Constants.outType.sale
   return params
 },
   
@@ -47,14 +48,14 @@ setSearchParams(params) {
     let index = e.currentTarget.dataset.index
     tableData.forEach(res=>{
       res.checked =  false
-      res.orderItemResponseList.forEach(item=>{
+      res.goodsList.forEach(item=>{
         item.checked = false
       })
     })
     tableData[index].checked = !tableData[index].checked
-    let orderItemResponseList = tableData[index].orderItemResponseList
-    if (orderItemResponseList && orderItemResponseList.length > 0) {
-      orderItemResponseList.forEach(res => {
+    let goodsList = tableData[index].goodsList
+    if (goodsList && goodsList.length > 0) {
+      goodsList.forEach(res => {
         res.checked = tableData[index].checked
       })
     }
@@ -76,11 +77,11 @@ setSearchParams(params) {
     console.log(index, index_)
     tableData.forEach(res=>{
       res.checked =  false
-      // res.orderItemResponseList.forEach(item=>{
+      // res.goodsList.forEach(item=>{
       //   item.checked = false
       // })
     })
-    tableData[index].orderItemResponseList[index_].checked = !tableData[index].orderItemResponseList[index_].checked
+    tableData[index].goodsList[index_].checked = !tableData[index].goodsList[index_].checked
 
     this.setData({
       tableData: tableData
@@ -100,8 +101,8 @@ setSearchParams(params) {
     let tableData = this.data.tableData
     tableData.forEach(res => {
       res.checked = checked
-      if (res.orderItemResponseList && res.orderItemResponseList.length > 0) {
-        res.orderItemResponseList.forEach(item => {
+      if (res.goodsList && res.goodsList.length > 0) {
+        res.goodsList.forEach(item => {
           item.checked = checked
         })
       }
@@ -124,12 +125,12 @@ setSearchParams(params) {
     let returnTotalAmount = Number(0)
     //过滤出已选数据
     tableData.forEach(res => {
-      if (res.orderItemResponseList && res.orderItemResponseList.length > 0) {
-        res.orderItemResponseList.forEach(item => {
+      if (res.goodsList && res.goodsList.length > 0) {
+        res.goodsList.forEach(item => {
           if (item.checked) {
-            item.priceOut = item.priceStandard
-            item.outQty = item.itemQty 
-            item.outAmt = item.priceOut * item.itemQty
+            // item.priceOut = item.priceStandard
+            item.outQty = item.outQty 
+            item.outAmt = item.priceOut * item.outQty
             delete item['priceLimited']
             delete item['pricePurchase']
             delete item['priceWholesale']
@@ -140,7 +141,7 @@ setSearchParams(params) {
     })
     if (choooseInboundItemList && choooseInboundItemList.length > 0) {
       choooseInboundItemList.forEach(res => {
-        returnTotalAmount += Number(res.itemQty * res.priceSale)
+        returnTotalAmount += Number(res.outQty * res.priceOut)
       })
     }
 
@@ -159,7 +160,7 @@ setSearchParams(params) {
   toAdd() {
     let itemList = this.data.choooseInboundItemList
     const eventChannel = this.getOpenerEventChannel();
-    eventChannel.emit('bindData', { itemList: itemList,fromNo: itemList[0].orderNo})
+    eventChannel.emit('bindData', { itemList: itemList,fromNo: itemList[0].outNo})
     wx.navigateBack({
       data: 1
     })

+ 8 - 8
package-base-select/pages/select-source-sale-order/select-source-sale-order.wxml

@@ -19,13 +19,13 @@
             <van-checkbox checked-color="#E4002B" value="{{ item.checked }}" data-index="{{index}}" data-index_="{{index_}}" bind:change="onListItemChange"></van-checkbox> <view style="color:#95A8CB;font-size:13px;padding-left: 6px;">全出</view>
           </view>
           <view style="width: 60%;">
-            <view style="font-size: 26rpx;color:#1B365D">{{item.orderNo}}</view>
+            <view style="font-size: 26rpx;color:#1B365D">{{item.outNo}}</view>
             <view style="font-size: 24rpx;color:#95A8CB;padding-top:10rpx"> {{item.makeTime ? wxmlUtil.format(item.makeTime) : ''}}</view>
           </view>
-          <view style="width: 20%;text-align: right;font-size: 26rpx;color:#1B365D">销售订单</view>
+          <view style="width: 20%;text-align: right;font-size: 26rpx;color:#1B365D">销售出库</view>
         </view>
       </view>
-      <view wx:for="{{item.orderItemResponseList}}" wx:for-item="item_" wx:for-index="index_">
+      <view wx:for="{{item.goodsList}}" wx:for-item="item_" wx:for-index="index_">
         <view style="display: flex;" data-index="{{index}}" data-index_="{{index_}}">
           <view style="place-self: center;padding-left: 15rpx;padding-right: 15rpx;">
             <view style="display: flex;padding-left: 10rpx;">
@@ -33,7 +33,7 @@
               <view class="red-checkbox" style="{{item_.checked ? 'color:#E4002B;' : ''}}">出</view>
             </view>
           </view>
-          <view class="border-solid" style="{{index_ === 0 ? (item.orderItemResponseList.length  == 1 ? 'margin-top:30rpx;margin-bottom:30rpx;' : 'margin-top:30rpx;') : index_ ===(item.orderItemResponseList.length -1) ? 'margin-bottom:30rpx;': ''}}"></view>
+          <view class="border-solid" style="{{index_ === 0 ? (item.goodsList.length  == 1 ? 'margin-top:30rpx;margin-bottom:30rpx;' : 'margin-top:30rpx;') : index_ ===(item.goodsList.length -1) ? 'margin-bottom:30rpx;': ''}}"></view>
           <view style="display: flex;width: 100%;">
             <view style="padding:20rpx;">
               <van-image radius="5px" width="80" height="80" src="{{item_.skuImages? item_.skuImages.path : ''}}" />
@@ -47,14 +47,14 @@
               </view>
               <view style="display: flex;width: 100%;margin-top: 20rpx;">
                 <view style="width: 50%;">
-                  <dk-cell contentFontSize="15" height="25rpx" fontWeight="bold" left="0rpx" contentColor="#FF7B1A" title="" content="{{ item_.priceSale ? item_.priceSale : 0}}"></dk-cell>
+                  <dk-cell contentFontSize="15" height="25rpx" fontWeight="bold" left="0rpx" contentColor="#FF7B1A" title="" content="{{ item_.priceOut ? item_.priceOut : 0}}"></dk-cell>
                 </view>
-                <view style="width: 50%;font-size:24rpx;color: #1B365D;line-height: 34rpx;font-weight: bold;text-align: right;">{{ ' x ' + (item_.itemQty ? item_.itemQty : 0)}}</view>
+                <view style="width: 50%;font-size:24rpx;color: #1B365D;line-height: 34rpx;font-weight: bold;text-align: right;">{{ ' x ' + (item_.outQty ? item_.outQty : 0)}}</view>
               </view>
             </view>
           </view>
         </view>
-        <view wx:if="{{index_ !== (item.orderItemResponseList.length -1)  && item.orderItemResponseList.length > 1}}" style="text-align: center;margin-left: 30rpx;margin-right: 30rpx;">
+        <view wx:if="{{index_ !== (item.goodsList.length -1)  && item.goodsList.length > 1}}" style="text-align: center;margin-left: 30rpx;margin-right: 30rpx;">
           <view style="border: solid 1rpx #A0A2A7;"></view>
         </view>
       </view>
@@ -62,7 +62,7 @@
   </view>
 </view>
 
-<van-empty wx:if="{{!tableData[0].orderItemResponseList || tableData[0].orderItemResponseList.length ==0}}" description="暂无出库单" />
+<van-empty wx:if="{{!tableData[0].goodsList || tableData[0].goodsList.length ==0}}" description="暂无出库单" />
 
 <view style="height: 200rpx;"></view>