Merge remote-tracking branch 'origin/master'

master
mengjiao 7 months ago
commit 463e3b0de6

@ -7,3 +7,11 @@ export function listReportWorks(query) {
params: query
});
}
export function getProductTraceList(query) {
return request({
url: '/mes/reportWorks/getProductTrace',
method: 'get',
params: query
});
}

@ -252,3 +252,16 @@ export function getClassInfoListByCheckType(query) {
params: query
});
}
//状态修改
export function submitCheckPics(recordId,fileList) {
const data = {
recordId,
fileList
}
return request({
url: '/quality/qcIncome/submitCheckPics',
method: 'put',
data: data
})
}

@ -314,14 +314,14 @@ export default {
this.poolNameList = JSON.parse(localStorage.getItem("POOL_NAME_LIST"));
this.poolName = localStorage.getItem("USER_POOL_NAME_CURRENT");
if(process.env.VUE_APP_BASE_API !='/dev-api'){
//
this.getUnReadList();
//
this.timer = setInterval(() => {
setTimeout(this.getUnReadList(), 30000);
}, 30000);
}
},
components: {
Breadcrumb,

@ -0,0 +1,284 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="100px">
<el-form-item label="产品类型" prop="materialCode">
<el-select v-model="queryParams.prodType" placeholder="请选择" @change="changeTableType">
<el-option
v-for="item in tableTypeOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="产品编号" prop="productCode">
<el-input
v-model="queryParams.materialCode"
placeholder="请输入产品编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品名称" prop="productDescZh">
<el-input
v-model="queryParams.productDescZh"
placeholder="请输入产品名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品英文名称" prop="productDescEn">
<el-input
v-model="queryParams.productDescEn"
placeholder="请输入产品英文名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="产品名称" prop="productDescZh">
<el-input
v-model="queryParams.productDescZh"
placeholder="请输入产品名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="品类" prop="productGroupName" label-width="120px">
<el-input
v-model="queryParams.productGroupName"
placeholder="请输入品类名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检验标准" prop="standarNo">
<el-input
v-model="queryParams.standarNo"
placeholder="请输入检验标准"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="时间" prop="incomeTimeArray">
<el-date-picker
v-model="queryParams.incomeTimeArray"
format="yyyy-MM-dd"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="traceList" @selection-change="handleSelectionChange" height="500px">
<!-- 序号 -->
<el-table-column type="index" width="50" align="center" :index="indexMethod" label="序号" fixed/>
<el-table-column label="产品编码" width="110" align="center" prop="productCode" :formatter="productCodeFormate" fixed/>
<el-table-column label="产品名称" width="200" align="center" prop="productDescZh" :show-overflow-tooltip="true" fixed/>
<el-table-column label="产品英文名称" width="150" align="center" prop="productDescEn" :show-overflow-tooltip="true" v-if="!showColumn"/>
<el-table-column label="最大批次数量" width="120" align="center" prop="batchMax" v-if="!showColumn"/>
<el-table-column label="卡板装载量" width="110" align="center" prop="palletNum" />
<el-table-column label="箱码规格" width="120" align="center" prop="spec" v-if="!showColumn"/>
<el-table-column label="品类" width="140" align="center" prop="productGroupName" v-if="!showColumn"/>
<el-table-column label="子母单比例" width="100" align="center" prop="unity" v-if="!showColumn"/>
<el-table-column label="检验标准" width="110" align="center" prop="standarNo"/>
<el-table-column label="箱型" width="50" align="center" prop="boxType" v-if="!showColumn"/>
<el-table-column label="垛型" width="50" align="center" prop="packType" v-if="!showColumn"/>
<el-table-column label="CPK品类" width="140" align="center" prop="cpkTypeName" v-if="!showColumn"/>
<el-table-column label="产线分配" width="400" align="left" prop="lineNames" v-if="!showColumn"/>
<el-table-column label="检验周期" align="center" prop="warehouseCycle" v-if="showColumn"/>
<el-table-column label="区位" width="140" align="center" prop="waNames" v-if="showColumn"/>
<el-table-column label="最近7次上载MES时间" width="600" align="left" prop="onLineTimes" :show-overflow-tooltip="true"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { getProductTraceList} from "@/api/mes/reportWorks";
import moment from "moment/moment";
export default {
name: "ProductTrace",
dicts: ["check_type","qms_category"],
components: {},
data() {
return {
showColumn:false,
//
loading: true,
//
ids: [],
checkTypeList: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// CPK
traceList: [],
projectNoOptions: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
typeCode: null,
checkType: null,
factoryCode: null,
materialCode: null,
materialName: null,
upVal: null,
downVal: null,
prodType: 'cp',
incomeTimeArray: [],
ymArrayStart: null,
ymArrayEnd: null,
},
//
form: {downVal:0,upVal:0},
//
rules: {
},
tableTypeOptions: [{
value: 'cp',
label: '成品'
}, {
value: 'bc',
label: '包材'
}]
}
},
created() {
this.getDate();
this.getList();
},
methods: {
/**获取默认查询时间段**/
getDate() {
let start = this.Fungetdate(0);
let end = this.Fungetdate(1);
this.queryParams.incomeTimeArray.push(start, end);
this.getList();
},
Fungetdate(num) {
var dd = new Date();
dd.setDate(dd.getDate() + num);
var y = dd.getFullYear();
var m = dd.getMonth() + 1; //
var d = dd.getDate();
return y + "-" + m + "-" + d;
},
changeTableType(val){
if(val == 'bc'){
this.showColumn = true;
}else{
this.showColumn = false;
}
},
/** 查询物料检验标准列表 */
getList() {
this.loading = true;
if (this.queryParams.incomeTimeArray.length > 0) {
this.queryParams.ymArrayStart = moment(this.queryParams.incomeTimeArray[0]).format("YYYY-MM-DD");
this.queryParams.ymArrayEnd = moment(this.queryParams.incomeTimeArray[1]).format("YYYY-MM-DD");
}
getProductTraceList(this.queryParams).then(response => {
this.traceList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
typeCode: null,
checkType: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
factoryCode: null,
delFlag: null,
materialCode: null,
materialName: null,
upVal: null,
downVal: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 导出按钮操作 */
handleExport() {
this.download('mes/reportWorks/getProductTraceExport', {
...this.queryParams
}, `productTrace_${new Date().getTime()}.xlsx`)
},
//
indexMethod(index) {
return index + 1;
},
//
productCodeFormate(row, column, cellValue) {
if (cellValue != null) {
return cellValue.slice(7, 18); //
}
}
}
};
</script>

@ -1033,7 +1033,6 @@ export default {
},
// -
handleUpdateDown(row) {
var statusesArray = this.statuses;
for (var i = 0; i < statusesArray.length; i++) {
if (statusesArray[i] != 'w0') {//

@ -259,7 +259,7 @@
:on-success="handleUploadSuccess"
list-type="picture-card"
:file-list="fileList"
:auto-upload="false">
>
<i slot="default" class="el-icon-plus"></i>
<div slot="file" slot-scope="{file}">
<img
@ -302,7 +302,8 @@
<script>
import { getCkeckProjectList,changeCheckDetailStatus,getIncome,commitActualValue,
commitCheckResult,getDefectInfoList,getWeightValue,getnoOkVals,getAutoJudge,getClassInfoListByCheckType
commitCheckResult,getDefectInfoList,getWeightValue,getnoOkVals,getAutoJudge,getClassInfoListByCheckType,
submitCheckPics
} from "@/api/quality/income";
import { getDefectValue, commitDefectValue, updateDefectValue} from "@/api/quality/checkTaskDefect";
import { getToken } from "@/utils/auth";
@ -745,22 +746,30 @@ export default {
window.location.href = file.url
},
handleUploadSuccess(res, file) {
debugger
if (res.code === 200) {
this.uploadList.push({ name: res.data.name, url: res.data.url });
this.uploadedSuccessfully();
} else {
this.number--;
this.$modal.closeLoading();
this.$modal.msgError(res.msg);
this.$refs.fileUpload.handleRemove(file);
this.uploadedSuccessfully();
}
},
submitPicForm() {
var picValues = null;
var picValues = '';
if(this.uploadList.length>0){
this.uploadList.map(item => picValues=picValues+item.url+',');
console.log(picValues)
};
if(this.fileList.length>0){
this.fileList.map(item => picValues=picValues+item.url+',');
};
submitCheckPics(this.recordId,picValues).then(response => {
this.$modal.msgSuccess("提交成功");
this.picValueOpen = false;
this.getList();
});
},
}
};

Loading…
Cancel
Save