Jelajahi Sumber

Merge remote-tracking branch 'origin/dev_ml'

13660505945 1 hari lalu
induk
melakukan
22d961a116

+ 1 - 1
jshERP-web/src/components/jeecg/JEditableTable.vue

@@ -1405,7 +1405,7 @@ export default {
         let disabled = false
         this.columns.forEach((column) => {
           let inputId = column.key + value.id
-          let sourceValue = (data[column.key] == null ? '' : data[column.key]).toString()
+          let sourceValue = data[column.key] == null ? '' : data[column.key]
 
           let defaultValue = null
           if (setDefaultValue) {

+ 11 - 9
jshERP-web/src/views/material/modules/MaterialModal.vue

@@ -407,7 +407,7 @@
                     :dropdownMatchSelectWidth="false"
                     showSearch
                     optionFilterProp="children"
-                    :value="typeof value === 'string' ? Number(value) : ''"
+                    :value="value"
                     @change="($event) => handleChange($event)"
                   >
                     <div slot="dropdownRender" slot-scope="menu">
@@ -660,6 +660,7 @@ export default {
             key: 'commodityUnit',
             width: '8%',
             type: FormTypes.input,
+            disabled: true,
             defaultValue: '',
             placeholder: '请输入${title}',
             validateRules: [{ required: true, message: '${title}不能为空' }],
@@ -1088,10 +1089,10 @@ export default {
             }
             if (!formData.unit) {
               //此时为多单位
-              if (formData.meList.length < 2) {
-                this.$message.warning('多单位的商品条码行数至少要有两行,请再新增一行条码信息!')
-                return
-              }
+              // if (formData.meList.length < 2) {
+              //   this.$message.warning('多单位的商品条码行数至少要有两行,请再新增一行条码信息!')
+              //   return
+              // }
               if (formData.meList[0].commodityUnit != basicUnit) {
                 this.$message.warning(
                   '条码之后的单位填写有误,单位【' +
@@ -1679,15 +1680,16 @@ export default {
           basicLowDecimal = ''
         for (let i = 0; i < mArr.length; i++) {
           let mInfo = mArr[i]
+          mInfo.commodityUnit = basicUnit
           if (i === 0) {
-            mInfo.commodityUnit = basicUnit
+            // mInfo.commodityUnit = basicUnit
             basicPurchaseDecimal = mInfo.purchaseDecimal
             basicCommodityDecimal = mInfo.commodityDecimal
             basicWholesaleDecimal = mInfo.wholesaleDecimal
             basicLowDecimal = mInfo.lowDecimal
           } else {
             //副单位进行换算
-            mInfo.commodityUnit = otherUnit
+            // mInfo.commodityUnit = otherUnit
             if (basicPurchaseDecimal) {
               mInfo.purchaseDecimal = (basicPurchaseDecimal * ratio).toFixed(2)
             }
@@ -1701,7 +1703,7 @@ export default {
               mInfo.lowDecimal = (basicLowDecimal * ratio).toFixed(2)
             }
             if (otherUnitTwo && i === 2) {
-              mInfo.commodityUnit = otherUnitTwo
+              // mInfo.commodityUnit = otherUnitTwo
               if (basicPurchaseDecimal) {
                 mInfo.purchaseDecimal = (basicPurchaseDecimal * ratioTwo).toFixed(2)
               }
@@ -1716,7 +1718,7 @@ export default {
               }
             }
             if (otherUnitThree && i === 3) {
-              mInfo.commodityUnit = otherUnitThree
+              // mInfo.commodityUnit = otherUnitThree
               if (basicPurchaseDecimal) {
                 mInfo.purchaseDecimal = (basicPurchaseDecimal * ratioThree).toFixed(2)
               }