فهرست منبع

Merge remote-tracking branch 'origin/master'

yusm 2 روز پیش
والد
کامیت
984dbb6ac5

+ 28 - 17
fhKeeper/formulahousekeeper/timesheet-workshop-h5/src/views/planView/todayPlan/distribution.vue

@@ -20,14 +20,13 @@
     <div class="distribution_con contentRoll">
       <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"> -->
-          <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">
+          <div class="distribution_ItemBomFlex">
             <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>
+            <template v-if="user.workTypeId == 1 && (isCanAgree || !(item.prodProcedureTeamList || []).length)">
+              <van-button style="margin-right: 10px;" @click="cancelReassignment(item)" type="info" size="small" v-if="item.isTransfer == 1">取消改派</van-button>
+              <van-button style="margin-right: 10px;" @click="showReassignment(item)" type="info" size="small" v-if="item.isTransfer == 0">改派</van-button>
+            </template>
+          </div>
           <div class="PlanItem">
             <span>{{item.prodProcedure.seq}}. {{ item.prodProcedure.name }}</span>
           </div>
@@ -88,10 +87,10 @@
   <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">
-          <template v-if="user.workTypeId == 1">
+          <!-- <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>
+          </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>
@@ -156,6 +155,7 @@ export default {
       dropDownSelectionValue: 2,
 
       deptId: '',
+      reassignRow: {}
     };
   },
   computed: {
@@ -221,10 +221,12 @@ export default {
     this.getPeople()
   },
   methods: {
-    cancelReassignment() {
-      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(',')
+    cancelReassignment(row) {
+      // 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(',')
+      const str = row.prodProcedure.name
+      const ids = row.id
       Dialog.confirm({
         title: '取消改派',
         message: `确定取消【${str}】改派吗?`,
@@ -249,9 +251,11 @@ export default {
     },
     changeDepartmentSelection(list) {
       const { value, label } = list[0] || {}
-      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(',')
+      // 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(',')
+      const str = this.reassignRow.prodProcedure.name
+      const ids = this.reassignRow.id
       Dialog.confirm({
         title: '改派',
         message: `确定将【${str}】改派给【${label}】部门吗?`,
@@ -276,7 +280,8 @@ export default {
         // on cancel
       });
     },
-    showReassignment() {
+    showReassignment(row) {
+      this.reassignRow = { ...row }
       this.popupDepartmentShow = true
     },
     cancellationReceiveBatch(){
@@ -693,6 +698,12 @@ export default {
           display: flex;
           flex-wrap: wrap;
           padding: 0px 6px 6px 6px;
+          .distribution_ItemBomFlex {
+            width: 100%;
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+          }
 
           .PlanItem {
             width: 50%;

+ 6 - 1
fhKeeper/formulahousekeeper/timesheet/src/components/popUpWindowForSelectingPersonnel.vue

@@ -3,7 +3,7 @@
     @close="$emit('input', false)" append-to-body top="5.6vh">
     <div class="theContent">
       <div class="theContent-input">
-        <el-input placeholder="请输入内容" v-model.trim="filterText" class="input-with-select"
+        <el-input placeholder="请输入内容" ref="focusOnInput" v-model.trim="filterText" class="input-with-select"
           @keyup.enter.native="nameSearch()">
           <el-button slot="append" icon="el-icon-search" @click="nameSearch()"></el-button>
         </el-input>
@@ -69,6 +69,11 @@ export default {
   watch: {
     value(newVal) {
       this.dialogVisible = newVal
+      if(newVal) {
+        this.$nextTick(() => {
+          this.$refs.focusOnInput.focus()
+        })
+      }
     },
     filterText(val) {
       if (this.user.userNameNeedTranslate != 1) {

+ 6 - 1
fhKeeper/formulahousekeeper/timesheet_mld/src/components/taskComponent.vue

@@ -394,12 +394,17 @@
             <el-button @click.native="planToWithdraw()">撤回</el-button>
         </template>
 
-        <template v-if="addForm.id && millerSReviewer.includes(user.id) && [3, 4].includes(showMmeiLaiDeData.taskStatus)">
+        <template v-if="addForm.id && millerSReviewer.includes(user.id) && [3, 4].includes(showMmeiLaiDeData.taskStatus) && !permissions.taskApprovalPlan">
             <template v-if="(showMmeiLaiDeData.taskStatus == 3 && user.id == showMmeiLaiDeData.checkFirstId) || (showMmeiLaiDeData.taskStatus == 4 && user.id == showMmeiLaiDeData.checkSecondId)">
                 <el-button type="danger" @click="planOperation(false)" :loading="addLoading">驳回</el-button>
                 <el-button type="success" @click="planOperation(true)" :loading="addLoading">通过</el-button>
             </template>
         </template>
+
+        <template v-if="permissions.taskApprovalPlan">
+            <el-button type="danger" @click="planOperation(false)" :loading="addLoading">驳回</el-button>
+            <el-button type="success" @click="planOperation(true)" :loading="addLoading">通过</el-button>
+        </template>
         
         <template>
             <el-button type="primary" @click="submitInsert()" :loading="addLoading" v-if="addForm.canEditTask || !addForm.id">

+ 4 - 2
fhKeeper/formulahousekeeper/timesheet_mld/src/permissions.js

@@ -158,9 +158,10 @@ const StringUtil = {
         equipmentInformationManagement: false,
         equipmentCostManagement: false,
 
-        // 任务
+        // 工作计划
         tasksReviewTaskFile: false,
-        viewFilesReviewedByOthers: false
+        viewFilesReviewedByOthers: false,
+        taskApprovalPlan: false
         
     }
     // console.log(arr);
@@ -308,6 +309,7 @@ const StringUtil = {
         arr[i] == '查看他人审核文件' ? obj.viewFilesReviewedByOthers = true : ''
 
         arr[i] == '全部工作计划待审核统计' ? obj.reportAllWorkPlansAwaitingReviewAndStatistics = true : ''
+        arr[i] == '审批计划' ? obj.taskApprovalPlan = true : ''
     }
     return obj
   }

+ 9 - 0
fhKeeper/formulahousekeeper/timesheet_mld/src/views/task/list.vue

@@ -163,6 +163,15 @@
                             </div>
                         </template>
                     </el-table-column>
+                    <el-table-column prop="executorName" label="创建人" sortable width="130">
+                        <template slot-scope="scope">
+                            <!-- <el-link type="primary" @click="showUser(scope.row.executorId)">{{scope.row.executorName}}</el-link> -->
+                            <span v-if="user.userNameNeedTranslate == '1'">
+                                <TranslationOpenDataText type='userName' :openid='scope.row.createrName'></TranslationOpenDataText>
+                            </span>
+                            <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.createrName}}</span>
+                        </template>
+                    </el-table-column>
                     <el-table-column prop="executorName" :label="$t('zhi-hang-ren')" sortable width="130">
                         <template slot-scope="scope">
                             <!-- <el-link type="primary" @click="showUser(scope.row.executorId)">{{scope.row.executorName}}</el-link> -->