于继渤 hace 2 años
padre
commit
25fcdafef9

+ 4 - 0
components/dkbase/dk-form-bill/dk-form-bill.js

@@ -141,6 +141,10 @@ Component({
       type: String,
       value: '可售量:'
     },
+    goodsTagText:{ //自定义tag
+      type: String,
+      value: ''
+    },
     // 结果集
     value: {
       type: String,

+ 3 - 0
components/dkbase/dk-form-bill/dk-form-bill.wxml

@@ -22,6 +22,9 @@
         <dk-tag wx:if="{{card.expandFlag}}" type="primary" padding="0 20rpx" height="40rpx" color="#9FAEE5" textColor="#FFFFFF" radius="5rpx" roundFlag="{{true}}" value="{{!card.expand?'展开':'收起'}}" catchtap="expandCard" data-item="{{card}}" data-index="{{cardIndex}}"></dk-tag>
         <!--明细,增加选择商品按钮-->
         <dk-tag wx:if="{{card.name == 'items' && !readonly && chooseVisible && ( card.chooseGoodsFlag == undefined || card.chooseGoodsFlag)}}" type="primary" padding="0 20rpx" height="40rpx" color="#77C5D5" textColor="#FFFFFF" radius="5rpx" roundFlag="{{true}}" value="选商品" catchtap="openChooseItems" data-item="{{card}}" data-index="{{cardIndex}}"></dk-tag>
+        <!-- 自定义tag -->
+        <dk-tag wx:if="{{card.name == 'items' && goodsTagText}}" type="primary" padding="0 20rpx" height="40rpx" color="#77C5D5" textColor="#FFFFFF" radius="5rpx" roundFlag="{{true}}" value="{{goodsTagText}}"  data-item="{{card}}" data-index="{{cardIndex}}"></dk-tag>
+
       </view>
     </view>
     <view wx:if="{{card.expandFlag && card.expand || !card.expandFlag}}">

+ 5 - 2
package-base-select/pages/select-source-purchase-order/select-source-purchase-order.js

@@ -13,6 +13,8 @@ Page({
     routeObjName: 'inbound',
     tableData: [],
     choooseInboundItemList: [],
+    buttonSaveList: [{ code: 'add', title:  mixins.$t('confirm'), width: '120rpx', color: '#1B365D' }],
+    contentSaveList: [{code:'flag',title:'全退',type:'checkbox'},{code:'need',title:'退货总额',type:'str'},{code:'amount',content:0,type:'number'}],
   },
   /**
    * @desc :   加载数据源
@@ -103,6 +105,7 @@ Page({
     */
   calculateTotal() {
     let tableData = this.data.tableData
+    let contentSaveList = this.data.contentSaveList
     let choooseInboundItemList = []
     let returnTotalAmount = Number(0)
     //过滤出已选数据
@@ -125,11 +128,11 @@ Page({
       })
     }
 
-
+    contentSaveList[2]['content'] = returnTotalAmount.toFixed(2)
 
     this.setData({
       choooseInboundItemList: choooseInboundItemList,
-      returnTotalAmount: returnTotalAmount.toFixed(2),
+      contentSaveList: contentSaveList,
     })
   },
   /**

+ 5 - 3
package-base-select/pages/select-source-purchase-order/select-source-purchase-order.wxml

@@ -32,12 +32,12 @@
             {{item.contactName}}
           </view>
           <view style="padding-left: 22rpx;padding-top: 19rpx;font-size: 26rpx;line-height: 36rpx;color: #FFFFFF;">
-            {{item.deliveryPhone}}
+            {{item.contactPhone}}
           </view>
         </view>
         <view style="display: flex;padding-right: 32rpx;">
           <view style="padding-left: 32rpx;padding-top: 15rpx;font-size: 26rpx;line-height: 36rpx;color: #FFFFFF;">
-            {{ wxmlUtil.addressToIndexOf(item.addressFull)}}
+            {{ item.returnAddress}}
           </view>
         </view>
       </view>
@@ -103,4 +103,6 @@
 
 <view style="height: 200rpx;"></view>
 <!--  底部工具栏-保存 -->
-<dk-save-bottom checked="{{allChecked}}" totallength="{{returnTotalAmount}}" flagTypeName="select-source-purchase-order" bottomClass="{{true}}" bind:onCheckboxChange="onCheckboxChange" bind:allClean="toAdd" />
+<!-- <dk-save-bottom checked="{{allChecked}}" totallength="{{returnTotalAmount}}" flagTypeName="select-source-purchase-order" bottomClass="{{true}}" bind:onCheckboxChange="onCheckboxChange" bind:allClean="toAdd" /> -->
+
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="toAdd"></dk-save-button>

+ 34 - 15
package-purchase/pages/purchase-return/add/add.js

@@ -1,5 +1,6 @@
 const Constants = require('@/utils/Constants.js');
 const util = require('@/utils/util.js')
+import Dialog from '@/dist/dialog/dialog.js';
 const mixins = require('@/mixins/index.js')
 Page({
   mixins: [mixins],
@@ -86,21 +87,21 @@ Page({
     if (this.data.formMode == Constants.formMode.edit) {
       let params = this.data.params
       return this.excute(this.data.service, this.data.service.update, {
-        returnId:params.returnId,
-        remarks:params.remarks ? params.remarks : '',
-        returnId:params.returnId,
+        returnId: params.returnId,
+        remarks: params.remarks ? params.remarks : '',
+        returnId: params.returnId,
       });
     } else {
       return this.excute(this.data.service, this.data.service.insert, this.data.params);
     }
   },
 
-    /**
-  * @desc :处理保存后续
-  * @date : 2024/2/1 15:49
-  * @author : 于继渤
-  */
-  handleData(){
+  /**
+* @desc :处理保存后续
+* @date : 2024/2/1 15:49
+* @author : 于继渤
+*/
+  handleData() {
     wx.navigateBack({
       data: 1
     })
@@ -152,9 +153,9 @@ Page({
     console.log('formData', formData)
     let cardList = this.data.cardList
     let contentList = this.data.contentList
-    
+
     cardList[0].sumAmount = sumAmount.toFixed(2)
-    if(contentList.length > 0){
+    if (contentList.length > 0) {
       contentList[2].content = sumAmount.toFixed(2)
     }
     this.setData({
@@ -194,8 +195,26 @@ Page({
       }
     })
   },
-
-
+  /**
+   * @desc :   自动办理事件
+   * @date : 2024/2/1 15:49
+   * @author : 于继渤
+   */
+  saveChange(e) {
+    let btnFormData = JSON.parse(this.data.btnFormData)
+    let that = this
+    if (!btnFormData.flag) {
+      //提示
+      Dialog.confirm({
+        message: '取消自动出库办理,需要在“出库办理”功能进行手工出货办理。',
+      }).then(() => { }).catch(() => {
+        btnFormData.flag = true
+        that.setData({
+          btnFormData: JSON.stringify(btnFormData)
+        })
+      });
+    }
+  },
 
   /**
    * 生命周期函数--监听页面加载
@@ -211,10 +230,10 @@ Page({
       //   res['usableQty'] = 0  //可售量
       // })
 
- 
+
       if (that.data.formMode == Constants.formMode.edit) {
         that.setData({
-          contentList:[],
+          contentList: [],
           showPopFlag: false,
           stepperFlag: false
         })

+ 5 - 3
package-purchase/pages/purchase-return/add/add.wxml

@@ -39,7 +39,7 @@
       <!-- 地址 -->
       <view style="display: flex;padding-right: 32rpx;">
         <view style="padding-left: 32rpx;padding-top: 15rpx;font-size: 26rpx;line-height: 36rpx;color: #FFFFFF;">
-          {{item.addressFull}}
+          {{item.returnAddress}}
         </view>
       </view>
     </view>
@@ -83,6 +83,8 @@ cardContentList="{{cardContentList}}"
 quantityRedTitle="可售量:"
 quantityRedCol="usableQty"
 quantityRedColFlagKey="usableQtyInsufficientFlag"
+
+goodsTagText="备货齐套"
  >
 </dk-form-bill>
 
@@ -109,9 +111,9 @@ quantityRedColFlagKey="usableQtyInsufficientFlag"
 
   </van-cell-group>
 </van-popup>
-
+<van-dialog id="van-dialog" />
 <!-- 新建按钮 -->
-<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonList}}" contentList="{{contentList}}" bind:open="save"></dk-save-button>
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonList}}" contentList="{{contentList}}" bind:open="save" bind:change="saveChange"></dk-save-button>
 
 
 

+ 3 - 1
package-purchase/pages/purchase-return/purchase-return.js

@@ -38,6 +38,8 @@ Page({
     tableData: [],
     active: 0,
     tabsActive: 0,
+    buttonSaveList:[],
+    contentSaveList:[{code:'need',title:'合计金额',type:'str'},{code:'amount',content:2000,type:'number'}]
   },
 
   /**
@@ -71,7 +73,7 @@ Page({
     if (tabsActive == 0) { //出库状态
       params.outStatus = ''
     } else if (tabsActive == 1) {
-      params.outStatus = '出库状态-出库'
+      params.outStatus = '出库状态-出库'
     } else if (tabsActive == 2) {
       params.outStatus = '出库状态-已出库'
     }

+ 1 - 1
package-purchase/pages/purchase-return/purchase-return.wxml

@@ -27,4 +27,4 @@
 
 
 <!-- 新建按钮 -->
-<dk-save-bottom flagTypeName="purchase-return-add" selectlength="{{selectlength}}" totallength="{{numberFormat.toThousandCents(totallength)}}" bind:submit="toAdd" submitFlag="{{false}}" />
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}" contentList="{{contentSaveList}}" bind:open="open"></dk-save-button>