|
|
@ -1,6 +1,6 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<el-dialog
|
|
|
|
<el-dialog
|
|
|
|
title="分配供应商"
|
|
|
|
:title="title"
|
|
|
|
:visible.sync="showFlag"
|
|
|
|
:visible.sync="showFlag"
|
|
|
|
width="1000px"
|
|
|
|
width="1000px"
|
|
|
|
append-to-body
|
|
|
|
append-to-body
|
|
|
@ -11,7 +11,7 @@
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<el-tabs type="border-card" v-if="belongGoalId != null">
|
|
|
|
<el-tabs type="border-card" v-if="belongGoalId != null">
|
|
|
|
<el-tab-pane label="分配供应商">
|
|
|
|
<el-tab-pane :label="title">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div class="query">
|
|
|
|
<div class="query">
|
|
|
|
<el-input
|
|
|
|
<el-input
|
|
|
@ -124,7 +124,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { getLeftList, getRightList, addSupplier } from "@/api/quality/qcGoalDistribute";
|
|
|
|
import { getLeftList, getRightList, addSupplier, getProductLeftList, getProductRightList } from "@/api/quality/qcGoalDistribute";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "QcGoalDistriBute",
|
|
|
|
name: "QcGoalDistriBute",
|
|
|
@ -145,6 +145,7 @@ export default {
|
|
|
|
total: 0,
|
|
|
|
total: 0,
|
|
|
|
// 弹出层标题
|
|
|
|
// 弹出层标题
|
|
|
|
title: "",
|
|
|
|
title: "",
|
|
|
|
|
|
|
|
model: null,
|
|
|
|
// 是否显示弹出层
|
|
|
|
// 是否显示弹出层
|
|
|
|
showFlag: false,
|
|
|
|
showFlag: false,
|
|
|
|
// 查询参数
|
|
|
|
// 查询参数
|
|
|
@ -170,7 +171,7 @@ export default {
|
|
|
|
//--------------------->
|
|
|
|
//--------------------->
|
|
|
|
leftList: [],
|
|
|
|
leftList: [],
|
|
|
|
rightList: [],
|
|
|
|
rightList: [],
|
|
|
|
titles: ["未关联供应商", "已关联供应商"],
|
|
|
|
titles: ["未分配", "已分配"],
|
|
|
|
// 左侧分页数据
|
|
|
|
// 左侧分页数据
|
|
|
|
Ltotal: "",
|
|
|
|
Ltotal: "",
|
|
|
|
LPageNum: "1",
|
|
|
|
LPageNum: "1",
|
|
|
@ -221,6 +222,7 @@ export default {
|
|
|
|
getList() {
|
|
|
|
getList() {
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
this.leftQueryParams.belongGoalId = this.belongGoalId;
|
|
|
|
this.leftQueryParams.belongGoalId = this.belongGoalId;
|
|
|
|
|
|
|
|
if(this.model) {
|
|
|
|
getLeftList(this.leftQueryParams).then((response) => {
|
|
|
|
getLeftList(this.leftQueryParams).then((response) => {
|
|
|
|
this.LPages = Math.ceil(response.total / this.LPageSize);
|
|
|
|
this.LPages = Math.ceil(response.total / this.LPageSize);
|
|
|
|
this.leftList = response.rows;
|
|
|
|
this.leftList = response.rows;
|
|
|
@ -229,6 +231,17 @@ export default {
|
|
|
|
this.LNextPage = this.leftQueryParams.pageNum + 1;
|
|
|
|
this.LNextPage = this.leftQueryParams.pageNum + 1;
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
getProductLeftList(this.leftQueryParams).then((response) => {
|
|
|
|
|
|
|
|
this.LPages = Math.ceil(response.total / this.LPageSize);
|
|
|
|
|
|
|
|
this.leftList = response.rows;
|
|
|
|
|
|
|
|
this.Ltotal = response.total;
|
|
|
|
|
|
|
|
this.LPageNum = this.leftQueryParams.pageNum;
|
|
|
|
|
|
|
|
this.LNextPage = this.leftQueryParams.pageNum + 1;
|
|
|
|
|
|
|
|
this.loading = false;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/**左边上一页**/
|
|
|
|
/**左边上一页**/
|
|
|
|
leftPageNumChange() {
|
|
|
|
leftPageNumChange() {
|
|
|
@ -249,6 +262,7 @@ export default {
|
|
|
|
getRightListFun() {
|
|
|
|
getRightListFun() {
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
this.rightQueryParams.belongGoalId = this.belongGoalId;
|
|
|
|
this.rightQueryParams.belongGoalId = this.belongGoalId;
|
|
|
|
|
|
|
|
if(this.model) {
|
|
|
|
getRightList(this.rightQueryParams).then((response) => {
|
|
|
|
getRightList(this.rightQueryParams).then((response) => {
|
|
|
|
this.RPages = Math.ceil(response.total / this.RPageSize);
|
|
|
|
this.RPages = Math.ceil(response.total / this.RPageSize);
|
|
|
|
let dataright = [];
|
|
|
|
let dataright = [];
|
|
|
@ -261,11 +275,23 @@ export default {
|
|
|
|
this.RPageNum = this.rightQueryParams.pageNum;
|
|
|
|
this.RPageNum = this.rightQueryParams.pageNum;
|
|
|
|
this.RNextPage = this.rightQueryParams.pageNum + 1;
|
|
|
|
this.RNextPage = this.rightQueryParams.pageNum + 1;
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
}).catch((error) => {
|
|
|
|
});
|
|
|
|
console.error('获取右侧列表数据失败:', error);
|
|
|
|
}else{
|
|
|
|
|
|
|
|
getProductRightList(this.rightQueryParams).then((response) => {
|
|
|
|
|
|
|
|
this.RPages = Math.ceil(response.total / this.RPageSize);
|
|
|
|
|
|
|
|
let dataright = [];
|
|
|
|
|
|
|
|
for (let i in response.rows) {
|
|
|
|
|
|
|
|
// 将返回的列表赋值于穿梭框左边列表
|
|
|
|
|
|
|
|
dataright.push(response.rows[i].key);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.rightList = dataright;
|
|
|
|
|
|
|
|
this.Rtotal = response.total;
|
|
|
|
|
|
|
|
this.RPageNum = this.rightQueryParams.pageNum;
|
|
|
|
|
|
|
|
this.RNextPage = this.rightQueryParams.pageNum + 1;
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|
// 可以在这里添加一些错误处理的逻辑
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/**右边上一页**/
|
|
|
|
/**右边上一页**/
|
|
|
|
rightPageNumChange() {
|
|
|
|
rightPageNumChange() {
|
|
|
|