Commit 8f1b80df authored by 沈翠玲's avatar 沈翠玲

排班计划查询详情bug

parent 911e9aa3
...@@ -232,10 +232,10 @@ ...@@ -232,10 +232,10 @@
</el-form> </el-form>
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="班次"> <el-tab-pane label="班次">
<Shift v-if="open" ref="shiftTab" :planCode="form.planCode" :shiftType="form.shiftType" :optType="optType"></Shift> <Shift v-if="open" ref="shiftTab" :planId="form.planId" :shiftType="form.shiftType" :optType="optType"></Shift>
</el-tab-pane> </el-tab-pane>
<el-tab-pane v-if="open" label="工作单元"> <el-tab-pane v-if="open" label="工作单元">
<Team v-if="open" ref="teamTab" :planId="form.planId" :form="form" :calendarType="form.calendarType" :optType="optType"></Team> <Team v-if="open" ref="teamTab" :planId="form.planId" :planCode="form.planCode" :form="form" :calendarType="form.calendarType" :optType="optType"></Team>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -383,7 +383,6 @@ export default { ...@@ -383,7 +383,6 @@ export default {
const planId = row.planId || this.ids const planId = row.planId || this.ids
getCalplan(planId).then(response => { getCalplan(planId).then(response => {
this.form = response.data; this.form = response.data;
console.log('this.form', this.form)
this.open = true; this.open = true;
this.title = "查看排班计划"; this.title = "查看排班计划";
this.optType = "view"; this.optType = "view";
......
...@@ -150,7 +150,7 @@ export default { ...@@ -150,7 +150,7 @@ export default {
dicts: ['SHIFT_TYPE'], dicts: ['SHIFT_TYPE'],
props: { props: {
shiftType: null, shiftType: null,
planCode: null, planId: null,
optType: null optType: null
}, },
watch: { watch: {
...@@ -159,7 +159,7 @@ export default { ...@@ -159,7 +159,7 @@ export default {
handler (newName, oldName) { handler (newName, oldName) {
console.log(newName, 'shiftType') console.log(newName, 'shiftType')
if (newName) { if (newName) {
if (this.planCode&&!this.editShiftType) { if (this.planId&&!this.editShiftType) {
this.getEditList(); this.getEditList();
} else if ((this.optType === 'view' || this.optType === 'edit')&&(this.editShiftType && this.editShiftType === newName)) { } else if ((this.optType === 'view' || this.optType === 'edit')&&(this.editShiftType && this.editShiftType === newName)) {
this.getEditList(); this.getEditList();
...@@ -170,7 +170,7 @@ export default { ...@@ -170,7 +170,7 @@ export default {
}, },
immediate: true immediate: true
}, },
planCode: { planId: {
handler (newName, oldName) { handler (newName, oldName) {
if (newName) { if (newName) {
this.editShiftType = this.shiftType this.editShiftType = this.shiftType
...@@ -254,7 +254,7 @@ export default { ...@@ -254,7 +254,7 @@ export default {
/** 查询计划班次列表 */ /** 查询计划班次列表 */
getEditList() { getEditList() {
this.loading = true; this.loading = true;
listEditShift({planCode: this.planCode}).then(response => { listEditShift({planId: this.planId}).then(response => {
this.shiftList = response.rows; this.shiftList = response.rows;
this.loading = false; this.loading = false;
}); });
......
...@@ -40,6 +40,7 @@ export default { ...@@ -40,6 +40,7 @@ export default {
components:{TeamSelect}, components:{TeamSelect},
props:{ props:{
planId:null, planId:null,
planCode: null,
optType:null, optType:null,
form: null, form: null,
calendarType:null calendarType:null
...@@ -56,7 +57,7 @@ export default { ...@@ -56,7 +57,7 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
planId: this.planId || '' planCode: this.planCode || ''
}, },
total: 0 total: 0
} }
...@@ -66,7 +67,7 @@ export default { ...@@ -66,7 +67,7 @@ export default {
}, },
methods:{ methods:{
getTeamList(){ getTeamList(){
if (!this.planId) { if (!this.planCode) {
return return
} }
this.loading = true; this.loading = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment