|
|
@@ -90,6 +90,7 @@
|
|
|
</div>
|
|
|
<el-table
|
|
|
ref="adjustTable"
|
|
|
+ :key="reScheduleValue"
|
|
|
:data="formData.adjustList"
|
|
|
border
|
|
|
stripe
|
|
|
@@ -164,6 +165,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
+ v-if= "reScheduleValue!=='paiban'"
|
|
|
prop="party"
|
|
|
label="目标人员"
|
|
|
width="130"
|
|
|
@@ -188,6 +190,7 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
+ v-if= "reScheduleValue!=='paiban'"
|
|
|
prop="afterDate"
|
|
|
label="目标日期"
|
|
|
width="150"
|
|
|
@@ -334,8 +337,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
reScheduleValue (newValue, oldValue) {
|
|
|
- // 当reScheduleValue发生变化时,清空调班数组
|
|
|
- this.formData.adjustList = []
|
|
|
+ if (oldValue !== '') { // 当reScheduleValue发生变化时,清空调班数组(初始化除外)
|
|
|
+ this.formData.adjustList = []
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
async mounted () {
|
|
|
@@ -357,6 +361,7 @@ export default {
|
|
|
// 初始化表单数据的方法
|
|
|
const initializeFormData = (data) => {
|
|
|
const { scheduleId, reason, executor, executeDate, adjustmentDetailPoList } = data || {}
|
|
|
+ // this.reScheduleValue = 'paiban'
|
|
|
self.formData = {
|
|
|
scheduleId,
|
|
|
reason,
|
|
|
@@ -365,7 +370,7 @@ export default {
|
|
|
beforeAdjust: i.beforeAdjust ? i.beforeAdjust.split(',') : [],
|
|
|
afterAdjust: i.afterAdjust ? i.afterAdjust.split(',') : [],
|
|
|
beforeShiftList: self.handleDateInit(i.beforeDate, index, 'beforeShiftList', i.createBy, i.beforeAdjust),
|
|
|
- afterShiftList: self.handleDateInit(i.afterDate, index, 'afterShiftList', i.party, i.afterAdjust)
|
|
|
+ afterShiftList: this.reScheduleValue === 'paiban' ? self.getPaiBanBanci(true, index, i.afterAdjust.split(',')) : self.handleDateInit(i.afterDate, index, 'afterShiftList', i.party, i.afterAdjust)
|
|
|
}))
|
|
|
}
|
|
|
console.log('formData', self.formData)
|
|
|
@@ -693,9 +698,13 @@ export default {
|
|
|
this.handleDateChange(row.afterDate, index, 'afterShiftList')
|
|
|
}
|
|
|
},
|
|
|
- getPaiBanBanci (visible, index) { // 排班变更方式,班次全部可选,目标人员和日期不可选
|
|
|
+ getPaiBanBanci (visible, index, afterAdjust) { // 排班变更方式,班次全部可选,目标人员和日期不可选
|
|
|
if (this.reScheduleValue === 'paiban' && visible === true) {
|
|
|
this.formData.adjustList[index]['afterShiftList'] = this.scheduleInfo.scheduleShift
|
|
|
+ if (afterAdjust) {
|
|
|
+ this.formData.adjustList[index]['afterAdjust'] = afterAdjust
|
|
|
+ return this.formData.adjustList[index]['afterShiftList']
|
|
|
+ }
|
|
|
} else {
|
|
|
return
|
|
|
}
|