lichao пре 3 година
родитељ
комит
dbb302098c
1 измењених фајлова са 6 додато и 0 уклоњено
  1. 6 0
      src/views/workManagement/requisition/detail.vue

+ 6 - 0
src/views/workManagement/requisition/detail.vue

@@ -241,6 +241,7 @@
               v-model="row.storageId"
               filterable
               clearable
+              @change="storageChange(row)"
             >
               <el-option
                 v-for="(item, index) in storageOptions"
@@ -908,6 +909,7 @@ export default {
               amount: 0,
               orderQuantity: 0,
               storageId: this.storageOptions.length > 0? this.storageOptions[0].id: null,
+              storageName: this.storageOptions.length > 0? this.storageOptions[0].cname: null,
               $cellEdit: true
             });
           });
@@ -924,6 +926,7 @@ export default {
               orderQuantity: 0,
               price: e.unitPrice,
               storageId: this.storageOptions.length > 0? this.storageOptions[0].id: null,
+              storageName: this.storageOptions.length > 0? this.storageOptions[0].cname: null,
               $cellEdit: true
             });
           });
@@ -982,6 +985,9 @@ export default {
         })
       }
     },
+    storageChange(row) {
+      this.$set(row, 'storageName', this.storageOptions.find(item => item.id == row.storageId).cname);
+    },
   },
 }
 </script>