Переглянути джерело

Merge remote-tracking branch 'origin/master'

yusm 3 днів тому
батько
коміт
fd7eab7112

+ 12 - 2
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/components/chooseSomeone.vue

@@ -44,7 +44,7 @@
         </div>
       </div>
     </div>
-    <div class="chooseSomeone_btn" v-if="newGroupViewBack">
+    <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>
@@ -85,6 +85,10 @@ export default {
       type: Array,
       default: () => []
     },
+    deptId: {
+      type: [Number, String],
+      default: () => '' // 派工后的部门ID
+    },
     type:{
       type:Number,
       default:()=> 0//0新增 1换人,
@@ -195,7 +199,13 @@ export default {
     },
     // 获取部门人员
     getDepartmentPersonnel() {
-      this.$axios.post('/department/listAllMemb', {})
+      let obj = {}
+      if(this.deptId) {
+        obj.deptId = this.deptId
+      }
+      this.$axios.post('/department/listAllMemb', {
+        ...obj
+      })
         .then(res => {
           if (res.code == "ok") {
             let list = res.data;

+ 27 - 9
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/todayPlan/distribution.vue

@@ -21,8 +21,13 @@
       <div class="distribution_box" v-for="item,index in distributionList" :key="index">
         <div class="distribution_ItemBom">
           <!-- <van-checkbox v-if="todayAndTomorrow" :disabled="item.checkboxDisabled  || (item.teamNames&&item.teamNames.indexOf(user.name) == -1)"  v-model="item.prodProcedure.isSelected"  @click="itemChecked" shape="square"> -->
-          <van-checkbox v-if="todayAndTomorrow" v-model="item.prodProcedure.isSelected"  @click="itemChecked" shape="square">
-          </van-checkbox>
+          <template v-if="user.workTypeId == 1">
+            <van-checkbox v-if="todayAndTomorrow" v-model="item.prodProcedure.isSelected"  @click="itemChecked" shape="square">
+            </van-checkbox>
+          </template>
+          <template v-if="user.workTypeId != 1">
+            <van-checkbox v-if="todayAndTomorrow" :disabled="item.checkboxDisabled  || (item.teamNames&&item.teamNames.indexOf(user.name) == -1)"  v-model="item.prodProcedure.isSelected"  @click="itemChecked" shape="square"></van-checkbox>
+          </template>
           <div class="PlanItem">
             <span>{{item.prodProcedure.seq}}. {{ item.prodProcedure.name }}</span>
           </div>
@@ -77,15 +82,18 @@
     </div>
     <!-- 弹出层选人 -->
     <van-popup v-model="popupShow" round position="bottom" :style="{ height: '80%',background: '#F4F4F4' }" >
-      <ChooseSomeone ref="ChooseSomeone" :groupView="this.groupViewNum" :type="this.peopleType" :groupViewBack="true" :peopleList="peopleList" @ChooseSomeoneChanhe="chooseSomeoneChanhe" :peopleListId="peopleListId" :key="ChooseSomeoneKey"></ChooseSomeone>
+      <ChooseSomeone ref="ChooseSomeone" :groupView="this.groupViewNum" :type="this.peopleType" :groupViewBack="true" :peopleList="peopleList" @ChooseSomeoneChanhe="chooseSomeoneChanhe" :peopleListId="peopleListId" :key="ChooseSomeoneKey" :deptId="deptId"></ChooseSomeone>
     </van-popup>
   </div>
   <div class="formBatch" v-if="todayAndTomorrow">
         <van-checkbox v-model="isAllChecked" :disabled="distributionList.length == 0" @click="allChecked" shape="square" style="padding-left:3vw"></van-checkbox>
         <div style="padding:1vh 2vw">
-          <van-button style="margin-right: 10px;" @click="cancelReassignment()" :disabled="doYouWantToCancelTheReassignment" type="info" size="small">取消改派</van-button>
-          <van-button style="margin-right: 10px;" @click="showReassignment()" :disabled="isItPossibleToReassign" type="info" size="small">改派</van-button>
-        <van-button style="margin-right: 10px;" @click="batchReceive()" :disabled="canBatchOperationsBePerformed" type="info" size="small">批量接收</van-button>
+          <template v-if="user.workTypeId == 1">
+            <van-button style="margin-right: 10px;" @click="cancelReassignment()" :disabled="doYouWantToCancelTheReassignment" type="info" size="small">取消改派</van-button>
+            <van-button style="margin-right: 10px;" @click="showReassignment()" :disabled="isItPossibleToReassign" type="info" size="small">改派</van-button>
+          </template>
+          
+          <van-button style="margin-right: 10px;" @click="batchReceive()" :disabled="canBatchOperationsBePerformed" type="info" size="small">批量接收</van-button>
           <van-button @click="cancellationReceiveBatch()" :disabled="canBatchOperationsBePerformed" type="info" size="small">批量取消接收</van-button>
           
           <!-- <van-button @click="batchAgree(false)" :disabled="!isCanAgree || distributionList.length == 0" type="danger" size="small" style="margin-left:2vw">批量驳回</van-button> -->
@@ -145,7 +153,9 @@ export default {
         { value: 1, text: '其他工位' },
         { value: 2, text: '全部' },
       ],
-      dropDownSelectionValue: 0
+      dropDownSelectionValue: 0,
+
+      deptId: '',
     };
   },
   computed: {
@@ -212,8 +222,9 @@ export default {
   },
   methods: {
     cancelReassignment() {
-      const str = (this.distributionList || []).map(item => item.prodProcedure && item.prodProcedure.name).join(',')
-      const ids = (this.distributionList || []).map(item => item.id).join(',')
+      const selectedData = this.distributionList.filter(item => item.prodProcedure && item.prodProcedure.isSelected)
+      const str = (selectedData || []).map(item => item.prodProcedure && item.prodProcedure.name).join(',')
+      const ids = (selectedData || []).map(item => item.id).join(',')
       Dialog.confirm({
         title: '取消改派',
         message: `确定取消【${str}】改派吗?`,
@@ -443,6 +454,13 @@ 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;