Ver Fonte

选择源单添加提示

于继渤 há 1 ano atrás
pai
commit
b18f6d7a33

+ 1 - 4
api/pages/ivt/outbound.js

@@ -38,11 +38,8 @@ module.exports = {
       chooseStorageObject: { key: 'chooseStorageObject',  url: '/package-base-select/pages/select-data/select-data',type:'objectType'  },
       chooseStorageOutReason: { key: 'chooseStorageOutReason', url:'/package-base-select/pages/select-data/select-data',type:'dictionary',dictCode:'基础资料-出库'  },
       selectSourceSaleOrder:{
-        key:'selectSourceSaleOrder',url:'/package-base-select/pages/select-source-sale-order/select-source-sale-order'
+        key:'selectSourceSaleOrder',url:'/package-base-select/pages/select-source-sale-order/select-source-sale-order', primaryKey: 'cusId'
       },
-
- 
-      
       selectCustomers: { key: 'selectCustomers', url: '/package-base-select/pages/select-customers/select-customers' },
       selectInventorySku:{ key: 'selectInventorySku', url: '/package-base-select/pages/select-data/select-data',type:'inventorySku'  },
     }

+ 17 - 1
components/dkbase/dk-form-bill/dk-form-bill.js

@@ -536,6 +536,16 @@ Component({
         that.setData({
           changeObj: item.item.changeObj,
         })
+        //判断是否存在此key的值
+         if (item.item.titpsKey && !that.data.form[item.item.titpsKey]) {
+             // 是否弹出询问框
+             Dialog.confirm({
+              message: item.item.titpsMessage,//提示信息
+            }).then(() => {
+            }).catch(() => {
+            })
+            return
+        }
         // 跳转链接
         if (item.item.urlKey) {
           this.setData({
@@ -588,8 +598,14 @@ Component({
                 }
               },
               success: function (res) {
+                let itemData = item.item   
+                  if(route.primaryKey){
+                    itemData.id =  that.data.form[route.primaryKey]
+                    console.log('route',route, that.data.form[route.primaryKey])
+                  }
+
                 // 通过eventChannel向被打开页面传送数据
-                res.eventChannel.emit('params', { item: item.item, route: route })
+                res.eventChannel.emit('params', { item: itemData, route: route })
               }
             })
           }

+ 4 - 3
package-base-select/pages/select-source-sale-order/select-source-sale-order.js

@@ -16,7 +16,7 @@ Page({
     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' }],
+    contentSaveList: [{ code: 'need', title: '合计金额', type: 'str' }, { code: 'amount', content: 0, type: 'number' }],
   },
   /**
    * @desc :   加载数据源
@@ -50,6 +50,7 @@ Page({
   setSearchParams(params) {
     //销售状态
     params.outStatusList = [Constants.outStatus.unOutBound]
+    params.cusId = this.data.item.id
     return params
   },
 
@@ -150,7 +151,7 @@ Page({
         res.orderItemResponseList.forEach(item => {
           if (item.checked) {
             item.priceOut = item.priceSale
-            // item.outingQty = Number(item.itemQty  - item.outQty) 
+            item.outingQty = Number(item.itemQty  - item.outQty) 
             item.outingAmt = item.priceOut * item.outingQty
             //设置最大值
             item['outingQty_min'] = 1
@@ -169,7 +170,7 @@ Page({
       })
     }
 
-    contentSaveList[2]['content'] = returnTotalAmount.toFixed(2)
+    contentSaveList[1]['content'] = returnTotalAmount.toFixed(2)
 
     this.setData({
       choooseInboundItemList: choooseInboundItemList,

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

@@ -3,7 +3,7 @@
 
 <van-sticky scroll-top="0">
   <!-- 查询条件 -->
-  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['roleName','roleCode'])}}">
+  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['rpNo','skuName'])}}">
   </dk-dropdown-menu>
 
 </van-sticky>

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

@@ -3,7 +3,7 @@
 
 <van-sticky scroll-top="0">
   <!-- 查询条件 -->
-  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['roleName','roleCode'])}}">
+  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['rpNo','skuName'])}}">
   </dk-dropdown-menu>
 
 </van-sticky>

+ 10 - 3
package-sales/pages/sales-outbound/add/add.js

@@ -39,6 +39,8 @@ Page({
         code: 'fromNo',
         name: 'fromNo',
         type: 'choose',
+        titpsKey:'cusId',
+        titpsMessage:'请选择客户',
         controlChooseFlag: true,
         title: mixins.$t("sourceOrder"),//'关联源单'
         urlKey: 'selectSourceSaleOrder'
@@ -222,6 +224,7 @@ Page({
     return this.excute(this.data[Service], this.data[Service][API] + '/' + id, {}).then(res => {
       if (res.data.code == 200) {
         let formData = JSON.parse(this.data.formData)
+        // return
         formData = res.data.data.data
         //销售订单列表转出库
         formData.fromNo = formData.orderNo
@@ -239,13 +242,17 @@ Page({
           }
           let list = []
           listData.forEach(item => {
-            if (this.data.formMode == 'detail') {
+            if (this.data.formMode == 'detail' && Service !== 'saleOutBoundService') {
               item.outingQty = item.outQty
               item.outingAmt = Number(item.outingQty * item.priceOut)
-            } else {
+            } else if(this.data.formMode == 'other'){
               item.outingQty = item.canOutingQty
               item.outingAmt = Number(item.outingQty * item.priceOut)
             }
+            //出库中 办理详情页
+            if(this.data.formMode == 'other' && Service == 'saleOutBoundService'){
+
+            }
 
             item.outingQtyMax = item.canOutingQty //可出库最大值
             item.outingQtyMin = 1  //可出库最小值
@@ -256,7 +263,7 @@ Page({
             })
           })
           console.log('listData',listData)
-          let that = - this
+          let that =  this
           //批量查库存
           this.getInventory({ skuIdNonStdCodeWhIdList: list }).then(item => {
             listData.forEach(res => {