|
|
@ -151,16 +151,16 @@
|
|
|
|
<el-table-column label="序号" align="center" type="index" width="50" />
|
|
|
|
<el-table-column label="序号" align="center" type="index" width="50" />
|
|
|
|
<el-table-column label="员工编号" align="center" prop="userCode" />
|
|
|
|
<el-table-column label="员工编号" align="center" prop="userCode" />
|
|
|
|
<el-table-column label="姓名" align="center" prop="userName" />
|
|
|
|
<el-table-column label="姓名" align="center" prop="userName" />
|
|
|
|
<el-table-column fixed="right" align="center" label="操作" width="200">
|
|
|
|
<el-table-column label="来料类别" align="center" prop="attr1" >
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<dict-tag
|
|
|
|
|
|
|
|
:options="dict.type.order_type_ll"
|
|
|
|
|
|
|
|
:value="scope.row.attr1"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column fixed="right" align="center" label="操作" width="100">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
v-if="msShowButton"
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
plain
|
|
|
|
|
|
|
|
@click="handleEdit(scope.row)"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
来料类型分配</el-button>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
size="small"
|
|
|
|
size="small"
|
|
|
|
type="danger"
|
|
|
|
type="danger"
|
|
|
@ -178,36 +178,18 @@
|
|
|
|
<el-button type="primary" @click="handleClose" >关 闭</el-button>
|
|
|
|
<el-button type="primary" @click="handleClose" >关 闭</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
<!-- 来料类别分配 -->
|
|
|
|
|
|
|
|
<el-dialog :title="msTitle" :visible.sync="msOpen" width="350px">
|
|
|
|
|
|
|
|
<el-form ref="msForm" :model="msForm" :rules="rules" label-width="80px">
|
|
|
|
|
|
|
|
<el-form-item label="来料类别" prop="attr1">
|
|
|
|
|
|
|
|
<el-select v-model="msForm.attr1" placeholder="请输入来料类别" clearable>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="dict in dict.type.order_type_ll"
|
|
|
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="msSubmitForm">确 定</el-button>
|
|
|
|
|
|
|
|
<el-button @click="msCancel">取 消</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<!--人员选择弹窗-->
|
|
|
|
<!--人员选择弹窗-->
|
|
|
|
<ItemSelectUser
|
|
|
|
<ItemSelectUser
|
|
|
|
ref="itemSelectUser"
|
|
|
|
ref="itemSelectUser"
|
|
|
|
@onSelected="onSelectUser"
|
|
|
|
@onSelected="onSelectUser"
|
|
|
|
|
|
|
|
:materialCode="materialCode"
|
|
|
|
></ItemSelectUser>
|
|
|
|
></ItemSelectUser>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { listCheckType, getCheckType, delCheckType, addCheckType, updateCheckType } from "@/api/quality/checkType";
|
|
|
|
import { listCheckType, getCheckType, delCheckType, addCheckType, updateCheckType } from "@/api/quality/checkType";
|
|
|
|
import{ getSelectedUsers, addUserBind, getInfoById, updateProduct, deleteByMaterialCode} from "@/api/quality/userbind";
|
|
|
|
import{ getSelectedUsers, addUserBind, deleteByMaterialCode} from "@/api/quality/userbind";
|
|
|
|
import ItemSelectUser from "./selectUser.vue";
|
|
|
|
import ItemSelectUser from "./selectUser.vue";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "CheckType",
|
|
|
|
name: "CheckType",
|
|
|
@ -229,11 +211,8 @@ export default {
|
|
|
|
// 显示搜索条件
|
|
|
|
// 显示搜索条件
|
|
|
|
showSearch: true,
|
|
|
|
showSearch: true,
|
|
|
|
openUserBind: false,
|
|
|
|
openUserBind: false,
|
|
|
|
msOpen: false,
|
|
|
|
|
|
|
|
msTitle: "",
|
|
|
|
|
|
|
|
materialCode: "",
|
|
|
|
materialCode: "",
|
|
|
|
materialName: "",
|
|
|
|
materialName: "",
|
|
|
|
msShowButton: false,
|
|
|
|
|
|
|
|
attr1: "",
|
|
|
|
attr1: "",
|
|
|
|
// 总条数
|
|
|
|
// 总条数
|
|
|
|
total: 0,
|
|
|
|
total: 0,
|
|
|
@ -266,7 +245,6 @@ export default {
|
|
|
|
materialName: null,
|
|
|
|
materialName: null,
|
|
|
|
phonenumber: null,
|
|
|
|
phonenumber: null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
msForm:{},
|
|
|
|
|
|
|
|
// 表单参数
|
|
|
|
// 表单参数
|
|
|
|
form: {},
|
|
|
|
form: {},
|
|
|
|
// 表单校验
|
|
|
|
// 表单校验
|
|
|
@ -295,10 +273,6 @@ export default {
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
msCancel() {
|
|
|
|
|
|
|
|
this.msOpen = false;
|
|
|
|
|
|
|
|
this.msReset();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 表单重置
|
|
|
|
// 表单重置
|
|
|
|
reset() {
|
|
|
|
reset() {
|
|
|
|
this.form = {
|
|
|
|
this.form = {
|
|
|
@ -317,15 +291,6 @@ export default {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.resetForm("form");
|
|
|
|
this.resetForm("form");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
msReset() {
|
|
|
|
|
|
|
|
this.msForm = {
|
|
|
|
|
|
|
|
id: null,
|
|
|
|
|
|
|
|
userCode: null,
|
|
|
|
|
|
|
|
userName: null,
|
|
|
|
|
|
|
|
attr1: null,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
this.resetForm("msForm");
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
handleQuery() {
|
|
|
|
handleQuery() {
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
@ -407,46 +372,12 @@ export default {
|
|
|
|
//查询绑定记录表
|
|
|
|
//查询绑定记录表
|
|
|
|
getSelectedUsers(this.getUserParams).then(response => {
|
|
|
|
getSelectedUsers(this.getUserParams).then(response => {
|
|
|
|
this.userList = response.rows;
|
|
|
|
this.userList = response.rows;
|
|
|
|
if(this.materialCode ==="checkTypeLL") {
|
|
|
|
|
|
|
|
this.msShowButton = true;
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
this.msShowButton = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.openUserBind = true;
|
|
|
|
this.openUserBind = true;
|
|
|
|
this.titleUserBind = "人员绑定详情";
|
|
|
|
this.titleUserBind = "人员绑定详情";
|
|
|
|
this.userloading = false;
|
|
|
|
this.userloading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//来料类型修改
|
|
|
|
|
|
|
|
handleEdit(row) {
|
|
|
|
|
|
|
|
this.msReset();
|
|
|
|
|
|
|
|
const id = row.id;
|
|
|
|
|
|
|
|
getInfoById(id).then(response => {
|
|
|
|
|
|
|
|
this.msForm = response.data;
|
|
|
|
|
|
|
|
this.msOpen = true;
|
|
|
|
|
|
|
|
this.msTitle = "来料类型分配";
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
//来料类型提交
|
|
|
|
|
|
|
|
msSubmitForm() {
|
|
|
|
|
|
|
|
this.$refs["msForm"].validate(valid => {
|
|
|
|
|
|
|
|
if (valid) {
|
|
|
|
|
|
|
|
if (this.msForm.id != null) {
|
|
|
|
|
|
|
|
updateProduct(this.msForm).then(response => {
|
|
|
|
|
|
|
|
if(response.code === 200){
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("分配成功");
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.$modal.msgError(response.msg);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.msOpen = false;
|
|
|
|
|
|
|
|
this.getSelectUserList();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getSelectUserList() {
|
|
|
|
getSelectUserList() {
|
|
|
|
this.userloading = true;
|
|
|
|
this.userloading = true;
|
|
|
|
//this.getUserParams.materialCode = orderCode;
|
|
|
|
//this.getUserParams.materialCode = orderCode;
|
|
|
@ -472,19 +403,21 @@ export default {
|
|
|
|
// 人员选择
|
|
|
|
// 人员选择
|
|
|
|
addUser() {
|
|
|
|
addUser() {
|
|
|
|
this.$refs.itemSelectUser.showFlag = true;
|
|
|
|
this.$refs.itemSelectUser.showFlag = true;
|
|
|
|
|
|
|
|
this.$refs.itemSelectUser.getList();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//人员选择确认
|
|
|
|
//人员选择确认
|
|
|
|
onSelectUser(obj) {
|
|
|
|
onSelectUser(obj) {
|
|
|
|
let data = {
|
|
|
|
let data = {
|
|
|
|
materialCode: this.materialCode,
|
|
|
|
materialCode: this.materialCode,
|
|
|
|
materialName: this.materialName,
|
|
|
|
materialName: this.materialName,
|
|
|
|
attr1: this.attr1,
|
|
|
|
attr1List: [],
|
|
|
|
userCodes: [],
|
|
|
|
userCodes: [],
|
|
|
|
userNames: [],
|
|
|
|
userNames: [],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
obj.forEach((item, index) => {
|
|
|
|
obj.forEach((item, index) => {
|
|
|
|
data.userCodes.push(item.userCode);
|
|
|
|
data.userCodes.push(item.userCode);
|
|
|
|
data.userNames.push(item.userName);
|
|
|
|
data.userNames.push(item.userName);
|
|
|
|
|
|
|
|
data.attr1List.push(item.attr1);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
addUserBind(data).then(response => {
|
|
|
|
addUserBind(data).then(response => {
|
|
|
|
if(response.code === 200) {
|
|
|
|
if(response.code === 200) {
|
|
|
|