fix:光芯日志mlog扫描设备二维码弹出新增表单

This commit is contained in:
shijing 2025-03-17 09:51:42 +08:00
parent 14e39014e0
commit 2d016d166d
2 changed files with 24 additions and 5 deletions

View File

@ -197,9 +197,7 @@
</el-form>
</el-main>
<el-footer>
<el-button type="primary" :loading="isSaveing" @click="submit"
>保存</el-button
>
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
<el-button @click="visible = false">取消</el-button>
</el-footer>
</el-container>
@ -217,6 +215,7 @@ const defaultForm = {
work_end_time:null,
note:'',
mgroup:'',
handle_user_name:"",
reminder_interval_list: [0,0],
};
@ -294,6 +293,7 @@ export default {
{ id: 10, name: "自产" },
{ id: 20, name: "外协" },
],
codeText:"",
visible: false,
isSaveing: false,
options: [],
@ -305,7 +305,7 @@ export default {
},
mounted() {
this.getRoute();
this.getUser();
// this.getUser();
this.getSupplier();
this.getEquipment();
@ -336,6 +336,9 @@ export default {
let that = this;
this.$API.em.equipment.list.req({ page: 0, type: 10,mgroup:that.mgroup}).then((res) => {
res.forEach((item) => {
if(that.codeText = item.number){
this.form.equipment = item.id;
}
let obj = {};
Object.assign(obj, item);
obj.label = item.name+'-'+item.number;
@ -361,8 +364,9 @@ export default {
});
},
//
open(mode = "add") {
open(mode = "add",text) {
this.mode = mode;
this.codeText = text;
this.visible = true;
return this;
},

View File

@ -9,6 +9,14 @@
v-auth="'mlog.create'"
>新增</el-button
>
<el-input
ref="codeInput"
v-model="codeText"
clearable
placeholder="设备编号"
style="width:150px"
@keyup.enter="codeTextChange"
></el-input>
</div>
<div class="right-panel">
<el-input
@ -206,6 +214,7 @@ export default {
selection: [],
mtask: "",
mlogId: "",
codeText: "",
};
},
mounted() {
@ -346,6 +355,12 @@ export default {
}
},
codeTextChange(text){
this.dialog.save = true;
this.$nextTick(() => {
this.$refs.saveDialog.open("add",text);
});
},
//
selectionChange(selection) {
this.selection = selection;