基础信息设备
parent
2832fbe175
commit
34e30f05e2
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="备品备件绑定"
|
||||
v-if="showFlag"
|
||||
:visible.sync="showFlag"
|
||||
:modal="false"
|
||||
width="1100px"
|
||||
center
|
||||
>
|
||||
<el-transfer
|
||||
filterable
|
||||
filter-placeholder="请输入班组人员名称"
|
||||
v-model="rightList"
|
||||
:titles="['未绑定备件列表', '已绑定备件列表']"
|
||||
:button-texts="['取消绑定', '绑定备件']"
|
||||
:data="leftList"
|
||||
>
|
||||
</el-transfer>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getSparePartsList,bindSpareParts } from "@/api/wms/equipment";
|
||||
import { Message } from "element-ui";
|
||||
|
||||
export default {
|
||||
name: "MdItemSingle",
|
||||
data() {
|
||||
return {
|
||||
showFlag: false,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
leftList: [],
|
||||
rightList: [],
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
|
||||
methods: {
|
||||
/** 查询备品备件列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
getSparePartsList(this.queryParams).then((response) => {
|
||||
for (let i in response.rows) {
|
||||
// 将返回的列表赋值于穿梭框左边列表
|
||||
this.leftList.push({
|
||||
key: response.rows[i].materialCode,
|
||||
label: response.rows[i].materialDesc,
|
||||
});
|
||||
}
|
||||
for (let i in response.selected) {
|
||||
this.rightList.push(response.selected[i].key);
|
||||
this.form.rightData = this.rightList;
|
||||
}
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.rightData = this.rightList;
|
||||
bindSpareParts(this.form).then((response) => {
|
||||
this.showFlag = false;
|
||||
this.$modal.msgSuccess("绑定成功");
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.el-transfer-panel {
|
||||
width: 350px;
|
||||
}
|
||||
.query {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-right: 4px;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue