xiaohaizhao 1 месяц назад
Родитель
Сommit
401f01eee5
2 измененных файлов с 15 добавлено и 4 удалено
  1. 1 1
      Eservice/components/productCard/index.js
  2. 14 3
      Eservice/nodeDetail/index.js

+ 1 - 1
Eservice/components/productCard/index.js

@@ -61,7 +61,7 @@ Component({
       console.log(data)
       if (data[name] == value) return;
       if (name == 'qty' && value <= 0) {
-        getApp().globalData.Language.modeBoxPrompts('数量不符合规则,已重置为1')
+        getApp().globalData.Language.modeBoxPrompts(getApp().globalData.Language.getMapText('数量不符合规则,已重置为1') || '数量不符合规则,已重置为1')
         data[name] = 1
       } else {
         data[name] = value

+ 14 - 3
Eservice/nodeDetail/index.js

@@ -64,8 +64,18 @@ Page({
       mainData: res.data[0],
       teams: res.data[0].team.map(v => v.userid),
       titems: res.data[0].titems,
-      addpersonBadge: isAddpersonRequired ? {count: '*', color: '#e34d59', offset: ['20rpx', '-10rpx'], size: 'small'} : {},
-      additemBadge: isAdditemRequired ? {count: '*', color: '#e34d59', offset: ['20rpx', '-10rpx'], size: 'small'} : {},
+      addpersonBadge: isAddpersonRequired ? {
+        count: '*',
+        color: '#e34d59',
+        offset: ['20rpx', '-10rpx'],
+        size: 'small'
+      } : {},
+      additemBadge: isAdditemRequired ? {
+        count: '*',
+        color: '#e34d59',
+        offset: ['20rpx', '-10rpx'],
+        size: 'small'
+      } : {},
       addpersonLabel: language['培训人员'] || '培训人员',
       additemLabel: language['工单物料'] || '工单物料',
       activeTab: res.data[0].workpresetjson.addperson !== 0 ? 0 : 1
@@ -291,7 +301,8 @@ Page({
         "itemname": v.itemname,
         "itemid": v.itemid,
         "model": v.model,
-        "spec": v.spec
+        "spec": v.spec,
+        qty: v.qty || 1
       }
     })
     let existingItems = this.data.titems || []