Browse Source

客户详情增加字段

lichao 3 years ago
parent
commit
c23287f825
1 changed files with 7 additions and 3 deletions
  1. 7 3
      src/components/selectComponent/customerSelect.vue

+ 7 - 3
src/components/selectComponent/customerSelect.vue

@@ -147,16 +147,19 @@ export default {
     this.remoteMethod()
   },
   methods: {
-    changeName(){
+    changeName(value){
       let optionList = this.configuration.dicData.length !== 0?this.dicData.length !== 0?this.dicData:this.configuration.dicData:this.dicData;
       let valueName ;
+      let data;
        optionList.map(item =>{
         if(item.id === this.value){
           valueName =  item.cname
+          data = item
         }
       })
       this.$emit('returnBack', this.value)
       this.$emit('valueName',valueName)
+      this.$emit('getRow', data)
     },
     //刷新触发
     refreshChange() {
@@ -180,11 +183,12 @@ export default {
         this.dicData.push({id: this.selection[0].id, cname: this.selection[0].cname})
         this.value = this.selection[0].id
       }
-      this.selection = []
       this.$emit('returnBack', this.value)
-      this.dialogVisible = false
       this.$emit('receiveList',this.dicData)
       this.$emit('valueName',this.dicData[0].cname)
+      this.$emit('getRow', this.selection[0])
+      this.selection = []
+      this.dialogVisible = false
     },
     //选中触发
     selectionChange(selection) {