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

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

changhaoning 1 год назад
Родитель
Сommit
ea2042423b

+ 2 - 2
components/dkbase/dk-popup/dk-popup.js

@@ -284,8 +284,8 @@ Component({
         let title = this.$t(item.title ? item.title : item.code)
         if (item.negativeNumber && form[item.code]>=0) { //和底下校验 负数 对冲 符合条件把 错误消息清空
           item.errMsg = '' 
-        } 
-        form[item.code] =  this.isNumber(form[item.code])?Number(form[item.code]):form[item.code]
+        }  
+        form[item.code] =  item.type == "step"?Number(form[item.code]):form[item.code] // step 一定是数量 预防字符串0 的数据
         // 如果必须输入,就要进行判断
         if (item.required && (!form[item.code] || form[item.code] === ""))
         {

+ 3 - 3
package-basic-data/pages/customer-list/detail/detail.js

@@ -194,7 +194,7 @@ Page({
       return
     }else{
       let name = e.detail.name
-      let cusId = this.data.id
+      let cusId = this.data.id?this.data.id:this.data.item.cusId
       if (name == 'follow') {
         this.getCusFollowList(cusId)
       }
@@ -204,7 +204,7 @@ Page({
         //   this.getOrderOut(cusId, Constants.outType.sale)
         // } else {
         //   this.getOrderList(cusId)
-        // }
+        // } 
         this.getOrderList(cusId)
       }
       // 收款
@@ -232,7 +232,7 @@ Page({
       this.setData({
         activeCard: e.detail.name
       })
-      if (name == 'order') {
+      if (name == 'order') { 
         this.getOrderList(data.cusId)
       }
       else if (name == 'order-out') {

+ 6 - 0
package-business-analysis/pages/business-overview/business-overview.js

@@ -54,7 +54,13 @@ Page({
    * @author : 常皓宁
    */
   getData(params) {
+    this.setData({
+      loading: true
+    })
     this.excute(this.data.service, this.data.service.getBusinessOverview, params).then(res => {
+      this.setData({
+        loading: false
+      })
       if (res.data.code == Constants.SUCESS_CODE) {
         let data = res.data.data
         this.setData({

+ 47 - 21
package-purchase/pages/purchase-order/add/add.js

@@ -56,26 +56,7 @@ Page({
       },
     ],
 
-    cardList: [{
-        name: 'wh'
-      }, {
-        name: 'relation'
-      },
-      {
-        name: 'items',
-        title: mixins.$t('goodsDetail'), //'商品明细',
-        color: '#E4002B',
-        controls: [{
-          card: 'relation',
-          code: 'sourceNo'
-        }],
-        noWarehouseFlag: true, // 控制是否隐藏去库存按钮
-        displayNum: 2
-      }, {
-        name: 'other',
-        title: mixins.$t('otherInfo'), //'其他信息'
-      }
-    ],
+    cardList: [],
     contentObj: {
       wh: [{
         code: 'supId',
@@ -733,6 +714,51 @@ Page({
         }
       }
     }
-
+    if (this.data.gradeCode == Constants.gradeCode.STD) {
+        this.setData({
+          cardList: [{
+            name: 'wh'
+          }, 
+          {
+            name: 'items',
+            title: mixins.$t('goodsDetail'), //'商品明细',
+            color: '#E4002B',
+            controls: [{
+              card: 'relation',
+              code: 'sourceNo'
+            }],
+            noWarehouseFlag: true, // 控制是否隐藏去库存按钮
+            displayNum: 2
+          }, {
+            name: 'other',
+            title: mixins.$t('otherInfo'), //'其他信息'
+          }
+        ],
+        })
+    }else{
+       this.setData({
+        cardList: [{
+          name: 'wh'
+        }, {
+          name: 'relation'
+        },
+        {
+          name: 'items',
+          title: mixins.$t('goodsDetail'), //'商品明细',
+          color: '#E4002B',
+          controls: [{
+            card: 'relation',
+            code: 'sourceNo'
+          }],
+          noWarehouseFlag: true, // 控制是否隐藏去库存按钮
+          displayNum: 2
+        }, {
+          name: 'other',
+          title: mixins.$t('otherInfo'), //'其他信息'
+        }
+      ],
+       })
+    }
+ 
   }
 })

+ 1 - 1
package-purchase/pages/supplier-list/add/add.js

@@ -357,7 +357,7 @@ Page({
         title: mixins.$t("returnAddress"),
       }
       ]
-      if(this.data.item.defaultSupplier){
+      if(this.data.item && this.data.item.defaultSupplier){
         formData.supType = Constants.kindCode.supplierPur// "供应商类别-采购"
         formData.supTypeName = mixins.$t("procurementSupplier") //"采购供应商"
       }else{