Просмотр исходного кода

排班变更,目标班次选择范围为排班的全部班次

cyy 8 месяцев назад
Родитель
Сommit
ff769455d5
1 измененных файлов с 10 добавлено и 12 удалено
  1. 10 12
      src/views/platform/bpmn/shiftTransferApplication/staForm.vue

+ 10 - 12
src/views/platform/bpmn/shiftTransferApplication/staForm.vue

@@ -224,7 +224,7 @@
                             /> -->
                             <div class="van-picker__toolbar"><button type="button" class="van-picker__cancel" @click="actionTbmbbcOpen('1',index)">取消</button><button type="button" class="van-picker__confirm" @click="actionTbmbbcCallback(mbbcInd)">确认</button></div>
                             <van-checkbox-group v-if="showDateArr[tabChildActiveArr[mbbcInd].tiaobanMuBiaoRenYuanId]['dateKeyValArr'].hasOwnProperty(tabChildActiveArr[mbbcInd].tiaobanMuBiaoRiQi)" v-model="tbmbbcArr[mbbcInd]" :style="{width:'100%',height:'100%'}">
-                              <van-checkbox v-for="(bca, i) in getBanCi(showDateArr[tabChildActiveArr[mbbcInd].tiaobanMuBiaoRenYuanId]['dateKeyValArr'][tabChildActiveArr[mbbcInd].tiaobanMuBiaoRiQi]||'')" :key="bca" :ref="'checkboxes'+i" class="checkBoxSty" :name="bca" >{{ bca }}</van-checkbox>
+                              <van-checkbox v-for="(bca, i) in getBanCi(showDateArr[tabChildActiveArr[mbbcInd].tiaobanMuBiaoRenYuanId]['dateKeyValArr'][tabChildActiveArr[mbbcInd].tiaobanMuBiaoRiQi]||'',form.type==='排班变更'?1:0)" :key="bca" :ref="'checkboxes'+i" class="checkBoxSty" :name="bca" >{{ bca }}</van-checkbox>
                             </van-checkbox-group>
                             <div v-else style="display: flex;align-items: center;height: 80%;justify-content: center;"><div>该日期已过或无可选班次!</div></div>
                         </van-popup>
@@ -380,7 +380,8 @@ export default {
       dateArr: [],
       modeType: ['调班', '排班变更'],
       poor: 0,
-      rowTF: []
+      rowTF: [],
+      scheduleShiftInfo: {}
     }
   },
   computed: {
@@ -477,6 +478,7 @@ export default {
       this.$common.request(dbSqlConfig ? 'query' : 'sql', dbSqlConfig ? { key: 'yddtbgjidhqpbsj', params: [val] } : sql).then(res => {
         if (res.state === 200) {
           const data = res.variables.data || []
+          this.scheduleShiftInfo = JSON.parse(data[0].config_) || {}
           data.forEach((item, i) => {
             if (showData.hasOwnProperty(item.user_id_)) {
               this.dateArr.forEach((e, n) => {
@@ -498,7 +500,6 @@ export default {
               })
             }
           })
-          console.log(this.$common.getDateNow(10), showData, 'showDatashowData')
           // this.showDateArr = showData
           if (this.typeValue == 4 && showData[this.userId].dateKeyArr.length === 0) {
             this.$toast(`当前排班已没有可选日期!`)
@@ -557,7 +558,6 @@ export default {
     changeShow(name, val, aim, index, def, defVal) {
       this[name] = val
       this[aim] = index
-      console.log(this.tbbrbcArr, aim, index)
     },
     actionTbbrbcCallback(index) {
       // const obj = this.$refs['tbbc' + index][0].getValues()
@@ -604,13 +604,11 @@ export default {
       this.tbmbbcShow = false
     },
     toggle(index, name) {
-      // console.log(this.$refs[name])
       if (this.$refs[name]) {
         this.$refs[name][index].toggle()
       }
     },
     toggleCheckboxestbbc(index, name) {
-      console.log(this.$refs[name])
       if (this.$refs[name]) {
         this.$refs[name][index].toggle()
       }
@@ -629,8 +627,12 @@ export default {
       return returnArr
     },
     // 获取班次数组
-    getBanCi(val) {
-      return val.split(',')
+    getBanCi(val, type) {
+      const mid = []
+      this.scheduleShiftInfo.scheduleShift.forEach((item, i) => {
+        mid.push(item.alias)
+      })
+      return type === 1 ? mid : val.split(',')
     },
     // 根据起止日期输出范围内所有日期
     generationDate(start, end, type = 'string') {
@@ -684,7 +686,6 @@ export default {
       })
     },
     vaildBanci(row, index, switchBtn = 'on') {
-      // console.log(row,this.showDateArr[row.tiaobanMuBiaoRenYuanId].dateKeyValArr, row.tiaobanMuBiaoBanCi)
       // 校验调班那天是否有重复班次
       if (this.form.type === '调班' && row.tiaobanBenRenBanCi !== '' && row.tiaobanBenRenRiQi !== '' && row.tiaobanMuBiaoBanCi !== '' && row.tiaobanMuBiaoRenYuan !== '' && row.tiaobanMuBiaoRenYuanId !== '' && row.tiaobanMuBiaoRiQi !== '') {
         const ubc = this.showDateArr[this.userInfo.user.id].dateKeyValArr[row.tiaobanBenRenRiQi]?.split(',') || []
@@ -923,7 +924,6 @@ export default {
             // this.$set(this.tbmbbcArr, this.tbbrbcArr.length, item.after_adjust_.split(','))
             this.tbbrbcArr.push(item.before_adjust_.split(','))
             this.tbmbbcArr.push(item.after_adjust_.split(','))
-            console.log(this.tbbrbcArr, this.tbmbbcArr)
           })
           this.actionSheetCallback({ text: data[0].title_, id: data[0].schedule_id_, obj: data[0] }, '1')
         }
@@ -1025,9 +1025,7 @@ export default {
               if (item.party === this.userInfo.user.id) {
                 item.status = '待审批'
               }
-              console.log(item.party === this.userInfo.user.id, item.status)
             })
-            console.log()
             midParam.status = midParam.adjustmentDetailPoList.some(item => item.status === '待审核') ? '审核中' : '待审批'
           } else if (midParam.adjustmentDetailPoList.length > 0) {
             midParam.adjustmentDetailPoList.forEach(item => {