质量模块优化

master
shaoyong 8 months ago
parent 8590485eac
commit c8e3de426b

@ -59,3 +59,22 @@ export function addSupplier(data) {
data: data
});
}
// 查询用户物料未关联列表
export function getProductLeftList(query) {
return request({
url: '/quality/qcGoalDistribute/getProductLeftList',
method: 'get',
params: query
});
}
// 查询用户物料已关联列表
export function getProductRightList(query) {
return request({
url: '/quality/qcGoalDistribute/getProductRightList',
method: 'get',
params: query
});
}

@ -88,6 +88,7 @@
<el-table-column label="收货数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="供应商名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="检测地点" align="center" prop="checkLoc"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>

@ -88,6 +88,7 @@
<el-table-column label="收货数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="供应商名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="检测地点" align="center" prop="checkLoc"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>

@ -11,18 +11,18 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="检验任务" prop="checkNo">
<el-form-item label="任务编号" prop="checkNo">
<el-input
v-model="queryParams.checkNo"
placeholder="请输入检测地点"
placeholder="请输入任务编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品编码" prop="materialCode">
<el-form-item label="产品名称" prop="materialName">
<el-input
v-model="queryParams.materialCode"
placeholder="请输入产品编码"
v-model="queryParams.materialName"
placeholder="请输入产品名称"
clearable
@keyup.enter.native="handleQuery"
/>
@ -100,6 +100,7 @@
<el-table-column label="收货数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="产线名称" align="center" prop="supplierName" width="120"/>
<el-table-column label="检测地点" align="center" prop="checkLoc"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>

@ -78,6 +78,7 @@
<el-table-column label="收货数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="仓库名称" align="center" prop="supplierName" width="240"/>
<el-table-column label="检测地点" align="center" prop="checkLoc"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>

@ -1,6 +1,6 @@
<template>
<el-dialog
title="分配供应商"
:title="title"
:visible.sync="showFlag"
width="1000px"
append-to-body
@ -11,7 +11,7 @@
</el-form-item>
</el-form>
<el-tabs type="border-card" v-if="belongGoalId != null">
<el-tab-pane label="分配供应商">
<el-tab-pane :label="title">
<div>
<div class="query">
<el-input
@ -124,7 +124,7 @@
</template>
<script>
import { getLeftList, getRightList, addSupplier } from "@/api/quality/qcGoalDistribute";
import { getLeftList, getRightList, addSupplier, getProductLeftList, getProductRightList } from "@/api/quality/qcGoalDistribute";
export default {
name: "QcGoalDistriBute",
@ -145,6 +145,7 @@ export default {
total: 0,
//
title: "",
model: null,
//
showFlag: false,
//
@ -170,7 +171,7 @@ export default {
//--------------------->
leftList: [],
rightList: [],
titles: ["未关联供应商", "已关联供应商"],
titles: ["未分配", "已分配"],
//
Ltotal: "",
LPageNum: "1",
@ -221,14 +222,26 @@ export default {
getList() {
this.loading = true;
this.leftQueryParams.belongGoalId = this.belongGoalId;
getLeftList(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;
});
if(this.model) {
getLeftList(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;
});
}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() {
@ -249,23 +262,36 @@ export default {
getRightListFun() {
this.loading = true;
this.rightQueryParams.belongGoalId = this.belongGoalId;
getRightList(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;
}).catch((error) => {
console.error('获取右侧列表数据失败:', error);
this.loading = false;
//
});
if(this.model) {
getRightList(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;
});
}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;
});
}
},
/**右边上一页**/
rightPageNumChange() {

@ -132,12 +132,19 @@
v-hasPermi="['quality:qcProjectType:remove']"
>删除</el-button>
<el-button
v-if="scope.row.goalType == 'yyyy' && scope.row.scope == '0'"
v-if="scope.row.goalType == 'yyyy' && scope.row.scope == '0' && scope.row.typeCode == 'material'"
size="mini"
type="text"
icon="el-icon-document-add"
@click="handleDistribution(scope.row)"
>分配</el-button>
@click="handleSupplier(scope.row)"
>分配供应商</el-button>
<el-button
v-if="scope.row.goalType == 'yyyy' && scope.row.scope == '0' && scope.row.typeCode != 'material'"
size="mini"
type="text"
icon="el-icon-document-add"
@click="handleProduct(scope.row)"
>分配产品</el-button>
</template>
</el-table-column>
</el-table>
@ -516,10 +523,20 @@ export default {
const checkTypeBody = this.checkTypes.find((item) => item.id === checkType);
return checkTypeBody ? checkTypeBody.checkName : '';
},
handleDistribution(row) {
handleSupplier(row) {
this.goalId = row.id;
this.$refs.itemDistribution.model = true;
this.$refs.itemDistribution.getRightListFun();
this.$refs.itemDistribution.getList();
this.$refs.itemDistribution.title = "分配供应商";
this.$refs.itemDistribution.showFlag = true;
},
handleProduct(row) {
this.goalId = row.id;
this.$refs.itemDistribution.model = false;
this.$refs.itemDistribution.getRightListFun();
this.$refs.itemDistribution.getList();
this.$refs.itemDistribution.title = "分配产品";
this.$refs.itemDistribution.showFlag = true;
},

Loading…
Cancel
Save