shish 2 years ago
parent
commit
c8e7a8ec69
1 changed files with 16 additions and 7 deletions
  1. 16 7
      ghsApp/src/admin/expend/addExpend.vue

+ 16 - 7
ghsApp/src/admin/expend/addExpend.vue

@@ -26,7 +26,7 @@
 
           <tui-list-cell class="line-cell" :arrow="true">
             <div class="tui-title">付款人</div>
-            <picker mode="selector" :value="form.getStaffId" :range="staffList" range-key="name" @change="kdChange" class="tui-input" >
+            <picker mode="selector" :value="form.getStaffId" :range="staffList" range-key="name" @change="payManChange" class="tui-input" >
               <input v-model="form.getStaffId" name="getStaffId" type="text" hidden />
               <div style="padding:6upx 0 6upx 0;">{{form.getStaffName}}</div>
             </picker>
@@ -109,6 +109,15 @@ export default {
 			})
   },
   methods: {
+    payManChange(e){
+			let index = e.detail.value
+      if(!this.$util.isEmpty(this.staffList)){
+        if(this.staffList[index]){
+          this.form.getStaffName = this.staffList[index].name
+          this.form.getStaffId = this.staffList[index].id
+        }
+      }
+    },
     getType(info){
       this.form.type = info.id
       this.form.typeName = info.name
@@ -145,12 +154,12 @@ export default {
 			getTypeList().then(res=>{
 				if(res.code == 1){
 					that.typeList = res.data.list ? res.data.list : []
-          if(!that.$util.isEmpty(that.typeList)){
-            let current = that.typeList[0]
-            that.form.type = current.id
-            that.form.typeName = current.name
-            that.$forceUpdate()
-          }
+          // if(!that.$util.isEmpty(that.typeList)){
+          //   let current = that.typeList[0]
+          //   that.form.type = current.id
+          //   that.form.typeName = current.name
+          //   that.$forceUpdate()
+          // }
 				}
 			})