Browse Source

Merge remote-tracking branch 'origin/master'

yusm 2 days ago
parent
commit
753b37b364

+ 4 - 1
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/components/chooseSomeone.vue

@@ -44,11 +44,14 @@
         </div>
       </div>
     </div>
+    <div class="chooseSomeone_btn" v-if="deptId">
+      <van-button round type="info" size="small" style="width: 100%;" :loading="loadingBtn" @click="treeHandClick()">确定</van-button>
+    </div>
     <div class="chooseSomeone_btn" v-if="newGroupViewBack && !deptId">
       <van-button round size="small" v-if="newGroupViewBack" @click="newGroupViewBackCli(false, 3)">从其他工位选择员工</van-button>
       <van-button round type="info" size="small" :loading="loadingBtn" @click="handClick()">确定</van-button>
     </div>
-    <div class="chooseSomeone_btn" v-if="!newGroupViewBack">
+    <div class="chooseSomeone_btn" v-if="!newGroupViewBack && !deptId">
       <van-button round type="info" size="small" style="width: 100%;" :loading="loadingBtn" @click="treeHandClick()">确定</van-button>
     </div>
   </div>

+ 29 - 26
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/todayPlan/distribution.vue

@@ -456,33 +456,36 @@ export default {
     distributionProp(item, index, str, itemObj) {
       console.log(item, '<==== 123321')
       const { isTransfer = 0, stationId } = item
-      if(isTransfer == 1 && stationId) {
-        this.deptId = stationId
-      } else {
-        this.deptId = ''
-      }
-      this.ChooseSomeoneKey++
-      if(str=='add'){
-        this.peopleType=0;
-        this.groupViewNum=2;
-        if(item.teamIds) {
-          this.peopleListId = item.teamIds.split(',')
+      this.getPeople(stationId)
+      setTimeout(() => {
+        if(isTransfer == 1 && stationId) {
+          this.deptId = stationId
         } else {
-          this.peopleListId = []
+          this.deptId = ''
         }
-      }else if(str=='change'){
-        this.peopleType=1;
-        this.groupViewNum=1;
-        // 针对换人存之前人的所有信息
-        this.peopleListId = [itemObj.userId]
-        this.peopleListIdObj = itemObj
-      }
-      if(this.beDeptList) {
-        console.log(item, index)
+        this.ChooseSomeoneKey++
+        if(str=='add'){
+          this.peopleType=0;
+          this.groupViewNum=2;
+          if(item.teamIds) {
+            this.peopleListId = item.teamIds.split(',')
+          } else {
+            this.peopleListId = []
+          }
+        }else if(str=='change'){
+          this.peopleType=1;
+          this.groupViewNum=1;
+          // 针对换人存之前人的所有信息
+          this.peopleListId = [itemObj.userId]
+          this.peopleListIdObj = itemObj
+        }
+        if(this.beDeptList) {
+          console.log(item, index)
 
-        this.distributionIndex = index
-        this.popupShow = true
-      }
+          this.distributionIndex = index
+          this.popupShow = true
+        }
+      }, 500)
     },
     getDistributionList() {
       this.$axios.post('/plan/planDetailWithStation', {
@@ -555,9 +558,9 @@ export default {
       }).catch(err => { this.$toast.clear(); });
     },
     // 获取人员
-    getPeople() {
+    getPeople(deptId = '') {
       this.$axios.post('/user/getSimpleActiveUserList', {
-        departmentId: this.departmentId,
+        departmentId: deptId || this.departmentId,
       })
       .then(res => {
         if (res.code == "ok") {