|
|
|
@ -84,17 +84,18 @@
|
|
|
|
|
</el-form>
|
|
|
|
|
<el-tabs type="border-card" v-if="form.userCodes != null">
|
|
|
|
|
<el-tab-pane label="关联物料">
|
|
|
|
|
<UserBind v-if="form.userCodes != null"
|
|
|
|
|
:optType="optType"
|
|
|
|
|
<UserBind ref="userBind"
|
|
|
|
|
v-if="form.userCodes != null"
|
|
|
|
|
:userCodes="form.userCodes"
|
|
|
|
|
:userNames="form.userNames"
|
|
|
|
|
:handleCode="handleCode"
|
|
|
|
|
>
|
|
|
|
|
</UserBind>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
</el-tabs>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
|
<!-- <el-button @click="cancel">取 消</el-button> -->
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
@ -113,12 +114,14 @@ export default {
|
|
|
|
|
loading: true,
|
|
|
|
|
// 选中数组
|
|
|
|
|
ids: [],
|
|
|
|
|
names: [],
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
single: true,
|
|
|
|
|
// 非多个禁用
|
|
|
|
|
multiple: true,
|
|
|
|
|
// 显示搜索条件
|
|
|
|
|
showSearch: true,
|
|
|
|
|
handleCode: '',
|
|
|
|
|
// 总条数
|
|
|
|
|
total: 0,
|
|
|
|
|
// 人员物料绑定表格数据
|
|
|
|
@ -210,32 +213,33 @@ export default {
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
|
this.ids = selection.map(item => item.userCode)
|
|
|
|
|
this.names = selection.map(item => item.userName)
|
|
|
|
|
this.handleCode = names.toString();
|
|
|
|
|
this.single = selection.length!==1
|
|
|
|
|
this.multiple = !selection.length
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "添加人员物料绑定";
|
|
|
|
|
this.title = "添加人员线体绑定";
|
|
|
|
|
},
|
|
|
|
|
/** 绑定按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
const userCodes = row.userCode || this.ids;
|
|
|
|
|
const userNames = row.userName;
|
|
|
|
|
const userNames = row.userName || this.names;
|
|
|
|
|
this.form.userCodes = userCodes;
|
|
|
|
|
this.form.userNames = userNames;
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改人员物料绑定";
|
|
|
|
|
this.optType = "edit";
|
|
|
|
|
// getMaterial(userCode).then(response => {
|
|
|
|
|
|
|
|
|
|
// });
|
|
|
|
|
this.title = "修改人员线体绑定";
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|
submitForm() {
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.$refs.userBind.liftList = [];
|
|
|
|
|
this.$refs.userBind.rightList = [];
|
|
|
|
|
this.getList();
|
|
|
|
|
/* this.$refs["form"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
@ -258,7 +262,7 @@ export default {
|
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
|
handleDelete(row) {
|
|
|
|
|
const ids = row.userCode || this.ids;
|
|
|
|
|
this.$modal.confirm('是否确认删除人员物料绑定编号为"' + ids + '"的数据项?').then(function() {
|
|
|
|
|
this.$modal.confirm('是否确认删除人员线体绑定编号为"' + ids + '"的数据项?').then(function() {
|
|
|
|
|
return delMaterial(ids);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|