质量目标优化,人员线体优化

master
shaoyong 6 months ago
parent 02088b141c
commit 743aa13aa3

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

@ -1,5 +1,5 @@
<template> <template>
<div> <div v-loading.lock="loading">
<div class="query"> <div class="query">
<el-input <el-input
style="width: 351px; margin-bottom: 10px" style="width: 351px; margin-bottom: 10px"
@ -108,7 +108,7 @@
import { getListProduct,getRightList ,addProduct} from "@/api/quality/userbind"; import { getListProduct,getRightList ,addProduct} from "@/api/quality/userbind";
export default { export default {
name: "Routeprodproduct", name: "userBind",
data() { data() {
return { return {
@ -136,8 +136,8 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
userCode: this.userCodes, userCodes: this.userCodes,
userName: this.userNames, userNames: this.userNames,
itemId: null, itemId: null,
itemCode: null, itemCode: null,
materialName: null, materialName: null,
@ -187,14 +187,31 @@ export default {
}; };
}, },
props: { props: {
userCodes: undefined, userCodes: {
userNames: undefined, type: [Array],
optType: undefined, required: true
},
userNames: {
type: [Array],
required: true
},
handleCode: {
type: [String],
required: true
}
}, },
created() { created() {
this.getList(); this.getList();
this.getRightListFun(); this.getRightListFun();
}, },
watch: {
handleCode(newVal,oldVal) {
if(newVal !== oldVal) {
this.getList();
this.getRightListFun();
}
}
},
methods: { methods: {
// // 穿 // // 穿
// filterMethod(keyword, row) { // filterMethod(keyword, row) {
@ -293,7 +310,7 @@ export default {
/** 提交按钮 */ /** 提交按钮 */
handleChange(value, direction, movedKeys) { handleChange(value, direction, movedKeys) {
if (this.queryParams.userCode != null) { if (this.queryParams.userCodes != null) {
this.queryParams.selectedValues = value; this.queryParams.selectedValues = value;
addProduct(this.queryParams).then((response) => { addProduct(this.queryParams).then((response) => {
this.$modal.msgSuccess("关联成功"); this.$modal.msgSuccess("关联成功");

@ -201,7 +201,6 @@ export default {
}, },
watch: { watch: {
belongGoalId(newVal,oldVal) { belongGoalId(newVal,oldVal) {
console.log(newVal);
if(newVal !== oldVal) { if(newVal !== oldVal) {
this.getList(); this.getList();
this.getRightListFun(); this.getRightListFun();

@ -321,7 +321,7 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
// //
qcGoalList: [], qcGoalList: [],
checkTypeList: [], checkTypeList: [],
checkTypes: [], checkTypes: [],
@ -446,7 +446,7 @@ export default {
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加检验方案维护"; this.title = "添加质量目标";
// //
this.form.goalType="yyyy" this.form.goalType="yyyy"
}, },
@ -457,7 +457,7 @@ export default {
getQcGoal(id).then(response => { getQcGoal(id).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改检验方案维护"; this.title = "修改质量目标";
this.handleCheckTypeList(this.form.typeCode); this.handleCheckTypeList(this.form.typeCode);
}); });
}, },

Loading…
Cancel
Save