lilei 2 nedēļas atpakaļ
vecāks
revīzija
edf00d3ec4

+ 1 - 1
src/views/common/productTypeAll.js

@@ -65,13 +65,13 @@ const ProductType = {
   },
   methods: {
     filter (inputValue, path) {
-      console.log(inputValue, path)
       return path.some(option => option.productTypeName.indexOf(inputValue) > -1)
     },
     setDefValue (defaultVal, row) {
       this.handleChange(defaultVal, row)
     },
     handleChange (value, row) {
+      console.log(value, row)
       this.defaultVal = value
       this.$emit('change', this.defaultVal, this.id, row)
       this.$emit('input', this.defaultVal)

+ 7 - 1
src/views/expenseManagement/expenseReimbursement/productInfoModal.vue

@@ -277,6 +277,7 @@ export default {
       expenseAcctDetailFindProductsBySn({ detailSn: this.expenseAccountDetailSn }).then(res => {
         if (res.data && res.data.length) {
           this.dataList = res.data
+          console.log(res.data, '------')
           this.dataList.map(item => {
             item.no = item.id
             this.$nextTick(() => {
@@ -285,7 +286,12 @@ export default {
               } else {
                 if (item.productTypeSn1 || item.productTypeSn2 || item.productTypeSn3) {
                   item.productType = [item.productTypeSn1, item.productTypeSn2, item.productTypeSn3]
-                  this.$refs['productType-' + item.no].setDefValue([item.productTypeSn1, item.productTypeSn2, item.productTypeSn3], item)
+                  this.$refs['productType-' + item.no].setDefValue(
+                    [item.productTypeSn1, item.productTypeSn2, item.productTypeSn3],
+                    [{ productTypeSn: item.productTypeSn1, productTypeName: item.productTypeName1 },
+                      { productTypeSn: item.productTypeSn2, productTypeName: item.productTypeName2 },
+                      { productTypeSn: item.productTypeSn3, productTypeName: item.productTypeName3 }]
+                  )
                 }
               }
             })