fix: 班次选择,先这样处理

This commit is contained in:
caoqianming 2023-12-22 10:38:09 +08:00
parent b207edccf5
commit a1b74f4639
5 changed files with 23 additions and 19 deletions

View File

@ -58,7 +58,7 @@
<el-option
v-for="item in equipmentOptions"
:key="item.id"
:label="item.name"
:label="item.full_name"
:value="item.id"
/>
</el-select>

View File

@ -255,9 +255,15 @@
</el-main>
</el-container>
</el-main>
<save-dialog v-if="dialogSave" ref="saveDialog" :mtask="currentMtask.id" :mgroup="mgroup"
:material_out="material_out" :material_in="material_in" :activeType="activeName" @success="handleSaveSuccess"
@closed="dialogSave = false"></save-dialog>
<save-dialog v-if="dialogSave" ref="saveDialog"
:mtask="currentMtask.id"
:mgroup="mgroup"
:material_out="material_out"
:material_in="material_in"
:activeType="activeName"
@success="handleSaveSuccess"
@closed="dialogSave = false">
</save-dialog>
<showDrawer ref="showDrawer" v-if="visibleDrawer" :mlogId="mlogId" @closed="visibleDrawer = false">
</showDrawer>
</el-container>

View File

@ -155,6 +155,7 @@
<save-dialog v-if="dialogSave"
ref="saveDialog"
:mgroup="currentMgroup.id"
:mgroupShiftRule = "currentMgroup.shift_rule"
:activeType="activeName"
@success="handleSaveSuccess"
@closed="dialogSave = false">

View File

@ -202,6 +202,7 @@
<save-dialog v-if="dialogSave"
ref="saveDialog"
:mgroup="currentMgroup.id"
:mgroupShiftRule = "currentMgroup.shift_rule"
:activeType="activeName"
@success="handleSaveSuccess"
@closed="dialogSave = false">

View File

@ -503,7 +503,7 @@
<el-option
v-for="item in equipmentOptions"
:key="item.id"
:label="item.name"
:label="item.full_name"
:value="item.id"
></el-option>
</el-select>
@ -579,7 +579,7 @@
<el-option
v-for="item in equipmentOptions"
:key="item.id"
:label="item.name"
:label="item.full_name"
:value="item.id"
></el-option>
</el-select>
@ -1048,6 +1048,7 @@
export default {
emits: ["success", "closed"],
props: {
mgroupShiftRule:{ type: String, default: "" },
mgroup:{ type: String, default: "" },
mtask: { type: String, default: "" },
mgroupId: { type: String, default: "" },
@ -1166,20 +1167,15 @@ export default {
})
},
getShiftOptions() {
this.$API.mtm.shift.list.req({ page: 0}).then((res) => {
this.shiftOptions = [];
if(this.activeType == "10车间"){
res.forEach(item=>{
if(item.rule=='两倒'){
this.shiftOptions.push(item);
}
})
let req_dict = {page: 0}
if(this.mgroupShiftRule != null && this.mgroupShiftRule != undefined){
req_dict.rule = this.mgroupShiftRule
}
this.$API.mtm.shift.list.req(req_dict).then((res) => {
if(res.length==1){
this.form.shift = res[0].id
}else{
res.forEach(item=>{
if(item.rule=='长白班'){
this.form.shift = item.id;
}
})
this.shiftOptions = res
}
});
},