姜福壮
This commit is contained in:
@@ -2,8 +2,8 @@ import request from '@/utils/request'
|
||||
import state from '@/store'
|
||||
import router from '@/router'
|
||||
|
||||
// 查询外协到货单列表
|
||||
export function searchTable1(...params) {
|
||||
// 初始化机床项目
|
||||
export function initProject() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
@@ -11,13 +11,12 @@ export function searchTable1(...params) {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理_外协到货单_查询数据',
|
||||
param: `外协到货单号_check=${params[0]}&外协到货单号=${params[1]}&外协厂家_check=${params[2]}&外协厂家=${params[3]}`
|
||||
name: 'PDM_项目名称_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 查询外协到货单明细
|
||||
export function searchTable2(...params) {
|
||||
// 初始化质检类型
|
||||
export function QualityType() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
@@ -25,8 +24,201 @@ export function searchTable2(...params) {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理_外协到货单明细_查询数据',
|
||||
param: `外协到货单流水号=${params[0]}`
|
||||
name: '质检管理_质检类型_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化不合格原因
|
||||
export function initReasonsForNonconformity() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '质检管理_不合格原因_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化不合格处理
|
||||
export function initDisqualificationTreatment() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '质检管理_不合格处理_查询数据'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 初始化质检人员
|
||||
export function initPerson() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '质检管理_质量情况_查询数据_质检人员'
|
||||
}
|
||||
})
|
||||
}
|
||||
// 组件查询
|
||||
export function searchgroup(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: 'PDM_组件名称_查询数据',
|
||||
param: '机床流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 零件查询
|
||||
export function searchparts(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '质检管理_零件信息_查询数据',
|
||||
param: '组件流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 工序查询
|
||||
export function searchprocedure(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '质检管理_工序信息_查询数据',
|
||||
param: '工艺计划流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 投产数量查询
|
||||
export function searchproceductnum(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '质检管理_投产数量_查询数据',
|
||||
param: '工艺计划流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 操作工查询
|
||||
export function searchoperators(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理_工序质检_查询人员数据_电脑端',
|
||||
param: '工序流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
// 新增序间检验
|
||||
export function submitTable(...param) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理_质检管理_新增',
|
||||
param: `零部件流水号=${param[0]}&质检类型代码=${param[1]}&数量=${param[2]}&是否合格=${param[3]}&人员编号=${param[4]}&不合格数量=${param[5]}&不合格原因=${param[6]}&不合格处理=${param[7]}&备注=${param[8]}&操作工=${param[9]}&编辑人员编号=${param[10]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function confirmEdit(...param) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理_质检管理_编辑处理',
|
||||
param: `质检流水号=${param[0]}&质检类型代码=${param[1]}&零部件流水号=${param[2]}&是否合格=${param[3]}&数量=${param[4]}&不合格数量=${param[5]}&不合格原因=${param[6]}&不合格处理=${param[7]}&备注=${param[8]}&编辑人员编号=${param[9]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function deleterow(...param) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '车间生产管理_质检管理_删除处理',
|
||||
param: `质检流水号=${param[0]}&质检类型代码=${param[1]}&零部件流水号=${param[2]}&数量=${param[3]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 质检管理_质量情况_查询数据
|
||||
export function selecttable(check1, value1, check2, value2, check3, value3, check4, value4, check5, value5, check6, value6, check7, value7, check8, value8, pageCurrent, pageSize) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '质检管理_工序外协件_查询数据',
|
||||
param: '机床流水号_check=' + check1 + '&机床流水号=' + value1 + '&组件流水号_check=' + check2 + '&组件流水号=' + value2 + '&零件名称_check=' + check3 + '&零件名称=' + value3 +
|
||||
'&质检类型代码_check=' + check4 + '&质检类型代码=' + value4 + '&开始时间_check=' + check5 + '&开始时间=' + value5 + '&结束时间_check=' + check6 + '&结束时间=' + value6 + '&质检情况_check=' + check7 + '&质检情况=' + value7 + '&人员编号_check=' + check8 + '&人员编号=' + value8 + `&PageCurrent=${pageCurrent}&PageSize=${pageSize}&PageCount=1111=int=output&ItemCount=1111=int=output`
|
||||
}
|
||||
})
|
||||
}
|
||||
// 质检管理_质量情况_查询数据
|
||||
export function selecttable22(check1, value1, check2, value2, check3, value3, check4, value4, check5, value5, check6, value6, check7, value7, check8, value8) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '质检管理_质量情况_查询数据',
|
||||
param: '机床流水号_check=' + check1 + '&机床流水号=' + value1 + '&组件流水号_check=' + check2 + '&组件流水号=' + value2 + '&零件名称_check=' + check3 + '&零件名称=' + value3 +
|
||||
'&质检类型代码_check=' + check4 + '&质检类型代码=' + value4 + '&开始时间_check=' + check5 + '&开始时间=' + value5 + '&结束时间_check=' + check6 + '&结束时间=' + value6 + '&质检情况_check=' + check7 + '&质检情况=' + value7 + '&人员编号_check=' + check8 + '&人员编号=' + value8
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchPic(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '质检管理_图片_查询数据',
|
||||
param: '质检流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -39,8 +231,58 @@ export function searchTableDetail(...params) {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '质检管理_外协质检数据_查询数据',
|
||||
param: `检测类型=${params[0]}&外协到货单明细流水号=${params[1]}`
|
||||
name: '质检管理_质检数据_查询数据',
|
||||
param: `检测类型=${params[0]}&质检流水号=${params[1]}`
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchData() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理工艺_加工顺序调整_查询正在加工零件工序_NEW'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function searchData1() {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: 'MES_机加工MES_记录零件待加工显示_NEW'
|
||||
}
|
||||
})
|
||||
}
|
||||
export function processingStatus(num) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '1',
|
||||
name: '车间生产管理_成组配套加工进度_查询数据',
|
||||
param: '工艺计划流水号=' + num
|
||||
}
|
||||
})
|
||||
}
|
||||
export function Prohibit(num, num1) {
|
||||
return request({
|
||||
url: '',
|
||||
method: 'post',
|
||||
data: {
|
||||
UserID: state.state.user.id,
|
||||
ModularID: router.currentRoute.path,
|
||||
type: '2',
|
||||
name: '质检管理_质检情况_禁用',
|
||||
param: '质检流水号=' + num + '&质检类型代码=' + num1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" prop="零件图号" align="center" width="173px" show-overflow-tooltip>
|
||||
<!--<el-table-column label="零件图号" prop="零件图号" align="center" width="180" show-overflow-tooltip>-->
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
@@ -143,6 +142,10 @@ export default {
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.total = 0
|
||||
this.pageSize = 20
|
||||
this.pageCurrent = 1
|
||||
this.tableData = []
|
||||
this.searchTable()
|
||||
},
|
||||
exportTable() {
|
||||
|
||||
@@ -1,115 +1,218 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card>
|
||||
<el-input v-model="orderNumber" clearable style="width: 210px;margin:0px 10px" placeholder="输入外协到货单或外协厂家" size="small"/>
|
||||
<!-- <span style="margin-left: 10px">外协厂家:</span>-->
|
||||
<!-- <el-input v-model="outsourcingSupplier" clearable style="width: 200px;margin:0px 10px" placeholder="请输入外协厂家" size="small"/>-->
|
||||
<el-button type="primary" size="small" icon="el-icon-search" plain style="margin-left: 10px;" @click="pageCurrent1=1;pageSize1=10;searchTable1()">查询</el-button>
|
||||
<el-table v-loading="" :data="tableData1" border stripe style="width: 100%;max-height: 600px;" height="400px" size="mini" @row-click="searchTable2">
|
||||
<el-table-column label="序号" align="center" width="55" type="index"/>
|
||||
<el-table-column label="外协到货单号" prop="外协到货单编号" align="center" min-width="100">
|
||||
<el-row>
|
||||
<el-select v-model="machineNumberValue" filterable placeholder="机床图号" size="small" style="margin-left: 10px;width: 180px;margin-top: 5px" clearable @change="machineChange()">
|
||||
<el-option
|
||||
v-for="item in machineNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
<div style="float: left">{{ item.label }}</div>
|
||||
<div style="float: right; color: #8492a6; font-size: 13px">{{ item.name }}</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-select v-model="groupNumberValue" filterable placeholder="组号" size="small" style="margin-left: 10px;width:100px" clearable>
|
||||
<el-option
|
||||
v-for="item in groupNumber"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-input v-model="SpareParts" filterable placeholder="零件图号或零件名称" style="width: 150px;margin-left: 10px" size="small" clearable/>
|
||||
<!--<span class="demonstration">时间区间:</span>-->
|
||||
<el-date-picker
|
||||
v-model="startTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px;margin-left: 10px"
|
||||
type="date"
|
||||
placeholder="选择开始日期"/>
|
||||
<span class="demonstration">~</span>
|
||||
<el-date-picker
|
||||
v-model="endTime"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
style="width: 160px"
|
||||
type="date"
|
||||
placeholder="选择结束日期"/>
|
||||
<!--<span>质检情况:</span>-->
|
||||
<el-select v-model="qualityInspectionValue" filterable placeholder="质检情况" size="small" style="width: 100px;margin-left: 10px" clearable>
|
||||
<el-option
|
||||
v-for="item in qualityInspection"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
<el-button type="primary" size="small" icon="el-icon-search" style="margin-left: 15px;margin-top: 5px" plain @click="pageSize=10; pageCurrent= 1;selecttable()">查询</el-button>
|
||||
<el-tooltip :open-delay="1000" effect="dark" content="导出查询数据" placement="top">
|
||||
<el-button v-positive="'loading'" type="warning" size="small" icon="el-icon-download" plain style="margin-left:10px" @click="exportExcel()">导出</el-button>
|
||||
</el-tooltip>
|
||||
</el-row>
|
||||
</el-card>
|
||||
<el-card>
|
||||
<el-table v-loading="loading" :data="tableData1" element-loading-text="质检数据较多,请耐心等候..." border size="mini" highlight-current-row style="width: 100%" stripe height="600px">
|
||||
<el-table-column label="机床图号" align="center" width="90px" fixed>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协到货单编号 }}
|
||||
{{ scope.row.机床图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外协厂家" prop="外协厂家名称" align="center" min-width="100">
|
||||
<el-table-column label="机床名称" align="center" min-width="180px" show-overflow-tooltip fixed>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.外协厂家名称 }}
|
||||
{{ scope.row.机床名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建日期" align="center" min-width="100">
|
||||
<el-table-column label="组号" align="center" width="60px" fixed>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作日期.split(' ')[0] }}
|
||||
{{ scope.row.组号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <div class="block" style="margin: 10px 0;">-->
|
||||
<!-- <el-pagination-->
|
||||
<!-- :current-page="pageCurrent1"-->
|
||||
<!-- :page-sizes="[10, 20, 30, 40]"-->
|
||||
<!-- :page-size="pageSize1"-->
|
||||
<!-- :total="total1"-->
|
||||
<!-- style="display:inline-block;width:50%"-->
|
||||
<!-- layout="total, sizes, prev, pager, next, jumper"-->
|
||||
<!-- @size-change="handleSizeChange1"-->
|
||||
<!-- @current-change="handleCurrentChange1"/>-->
|
||||
<!-- </div>-->
|
||||
<el-table v-loading="" :data="tableData2" :summary-method="getSummaries" show-summary border stripe style="width: 100%;min-height: 400px" height="420px" size="mini">
|
||||
<el-table-column label="序号" align="center" width="50px" type="index"/>
|
||||
<el-table-column label="零件名称" align="center" min-width="70px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件图号" align="center" min-width="120px">
|
||||
<el-table-column label="零件图号" align="center" min-width="130px" show-overflow-tooltip fixed>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件图号 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="零件数" align="center" width="70px">
|
||||
<el-table-column label="零件名称" align="center" fixed>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.批次数量 }}
|
||||
{{ scope.row.零件名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质检人员" align="center" width="70px">
|
||||
<el-table-column label="加工数" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格或材料" align="center" width="120px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.规格或材料 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="工序名称" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.工艺名称 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="质检类型" align="center">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- {{ scope.row.质检类型 }}-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<el-table-column label="质检人员" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验数" align="center" width="70px">
|
||||
<el-table-column label="检测数量" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数量 || 0 }}
|
||||
<template v-if="scope.row.edit">
|
||||
<el-input-number v-model="scope.row.数量" :min="0" :max="scope.row.零件数量" :step="1" style="width: 90%" size="mini"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.数量 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数" align="center" min-width="140px">
|
||||
<el-table-column label="检测结果" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.不合格数量 || 0 }}
|
||||
<template v-if="scope.row.edit">
|
||||
<el-select v-model="scope.row.是否合格" placeholder="请选择" filterable size="mini" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in qualityInspection"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.是否合格 ===1 ? '合格' : '不合格' }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格原因" align="center" width="90px">
|
||||
<el-table-column label="不合格数" align="center" width="120px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit && scope.row.是否合格 === 2">
|
||||
<el-input-number v-model="scope.row.不合格数量" :min="0" :max="scope.row.数量" :step="1" style="width: 90%" size="mini"/>
|
||||
</template>
|
||||
<template v-else-if="scope.row.是否合格 === 1">
|
||||
{{ scope.row.不合格数量 = '' }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.不合格数量 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格原因" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit && scope.row.是否合格 === 2">
|
||||
<el-select v-model="scope.row.不合格原因" placeholder="请选择" filterable size="mini" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in reasonsForNonconformity"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else-if="scope.row.是否合格 === 1">
|
||||
{{ scope.row.不合格原因 = null }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.不合格原因文本 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处理结果" align="center" width="70px">
|
||||
<el-table-column label="处理结果" align="center" width="140px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit && scope.row.是否合格 === 2">
|
||||
<el-select v-model="scope.row.处理结果" placeholder="请选择" filterable size="mini" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in disqualificationTreatment"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-else-if="scope.row.是否合格 === 1">
|
||||
{{ scope.row.处理结果 = null }}
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.不合格处理文本 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验时间" align="center" min-width="135px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作时间.split(' ')[0] || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="形位" align="center" width="90px">
|
||||
<el-table-column label="操作工" align="center" width="90px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作工姓名 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="质检时间" align="center" width="140px">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.操作时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" align="center" width="140px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<template v-if="scope.row.edit">
|
||||
<el-input v-model="scope.row.备注" size="mini" style="width: 100%"/>
|
||||
</template>
|
||||
<template v-else>
|
||||
{{ scope.row.备注 }}
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="编辑人" align="center" width="90px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.编辑人 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="编辑时间" align="center" width="90px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.编辑时间 ? scope.row.编辑时间.split(' ')[0] : scope.row.编辑时间 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="形位" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData" highlight-current-row stripe size="mini">
|
||||
<el-table-column width="50px" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150px" align="center" label="类别">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100px" align="center" label="数值">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数值 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="零件数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="text" plain size="mini" icon="el-icon-search" @click="searchTableDetail(1, scope.row.外协到货单明细流水号)">形位</el-button>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="尺寸" align="center" width="90px">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData" highlight-current-row stripe size="mini">
|
||||
<el-table :data="gridData" class="subTableHeader" highlight-current-row size="mini">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="类别">
|
||||
<template slot-scope="scope">
|
||||
@@ -127,14 +230,14 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="text" plain size="mini" icon="el-icon-search" @click="searchTableDetail(2, scope.row.外协到货单明细流水号)">尺寸</el-button>
|
||||
<el-button slot="reference" type="text" plain size="mini" icon="el-icon-search" @click="searchTableDetail(1, scope.row.质检流水号)">形位</el-button>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外观" align="center" width="90px">
|
||||
<el-table-column label="尺寸" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData" highlight-current-row stripe size="mini">
|
||||
<el-table :data="gridData" class="subTableHeader" highlight-current-row size="mini">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="类别">
|
||||
<template slot-scope="scope">
|
||||
@@ -152,128 +255,535 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="text" plain size="mini" icon="el-icon-search" @click="searchTableDetail(3, scope.row.外协到货单明细流水号)">外观</el-button>
|
||||
<el-button slot="reference" type="text" plain size="mini" icon="el-icon-search" @click="searchTableDetail(2, scope.row.质检流水号)">尺寸</el-button>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="外观" align="center" width="70">
|
||||
<template slot-scope="scope">
|
||||
<el-popover placement="right" width="500" trigger="click">
|
||||
<el-table :data="gridData" class="subTableHeader" highlight-current-row size="mini">
|
||||
<el-table-column width="50" align="center" type="index" label="序号"/>
|
||||
<el-table-column min-width="150" align="center" label="类别">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.类别 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="数值">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.数值 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column min-width="100" align="center" label="零件数量">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.零件数量 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="text" plain size="mini" icon="el-icon-search" @click="searchTableDetail(3, scope.row.质检流水号)">外观</el-button>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="查看图片" align="center" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="!scope.row.edit"
|
||||
size="mini"
|
||||
type="text"
|
||||
plain
|
||||
icon="el-icon-search"
|
||||
@click="viewPicture(scope.row)">查看图片</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
v-if="!loading"
|
||||
:current-page="pageCurrent"
|
||||
:page-sizes="[10, 20, 30, 40, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"/>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { searchTable1, searchTable2, searchTableDetail } from '@/api/Outsourcing/OutsourcingQCSearch'
|
||||
import { initProject, searchgroup, selecttable, QualityType, searchPic, searchTableDetail, searchData, searchData1, processingStatus, initPerson, Prohibit, initDisqualificationTreatment, initReasonsForNonconformity, searchparts, searchprocedure, searchoperators, submitTable, confirmEdit, searchproceductnum, deleterow } from '@/api/Outsourcing/OutsourcingQCSearch'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'OutsourcingQCSearch',
|
||||
data() {
|
||||
return {
|
||||
orderNumber: '',
|
||||
outsourcingSupplier: '',
|
||||
tableData1: [],
|
||||
// pageCurrent1: 1,
|
||||
// pageSize1: 10,
|
||||
// total1: 0,
|
||||
tableData2: [],
|
||||
pageCurrent2: 1,
|
||||
pageSize2: 10,
|
||||
total2: 0,
|
||||
gridData: []
|
||||
machineNumberValue: '',
|
||||
machineNumber: [],
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
form2: {
|
||||
机床图号: '',
|
||||
组号: '',
|
||||
零件图号: '',
|
||||
工序: '',
|
||||
质检类型: 10,
|
||||
质检情况: 1,
|
||||
检测数: '',
|
||||
不合格数量: '',
|
||||
不合格原因: '',
|
||||
不合格处理: '',
|
||||
备注: '',
|
||||
操作工: ''
|
||||
},
|
||||
rules2: {
|
||||
操作工: [{ required: true, message: '请选择操作工' }],
|
||||
工序: [{ required: true, message: '请选择工序' }],
|
||||
质检情况: [{ required: true, message: '请选择质检情况' }]
|
||||
},
|
||||
urls: [],
|
||||
URL: '',
|
||||
number: '',
|
||||
reasonsForNonconformity: [],
|
||||
disqualificationTreatment: [],
|
||||
operators: [],
|
||||
groupNumberValue: '',
|
||||
groupNumber: [],
|
||||
groupNumber1: [],
|
||||
partNum: [],
|
||||
procedureNum: [],
|
||||
gridData: [],
|
||||
QualityTypeNumber: [],
|
||||
QualityTypeValue: '',
|
||||
qualityInspectionValue: '',
|
||||
qualityInspection: [
|
||||
{
|
||||
value: 1,
|
||||
label: '合格'
|
||||
}, {
|
||||
value: 2,
|
||||
label: '不合格'
|
||||
}
|
||||
],
|
||||
tableData1: [],
|
||||
tableData10: [],
|
||||
tableData20: [],
|
||||
tableData5: [],
|
||||
SpareParts: '',
|
||||
SparePartsNumber: '',
|
||||
SparePartsName: '',
|
||||
personNum: '',
|
||||
person: [],
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisible4: false,
|
||||
dialogFormVisible10: false,
|
||||
AddTableData_disable: false,
|
||||
loading: false,
|
||||
total: 0, // 总条数
|
||||
pageSize: 10, // 每页显示条数
|
||||
pageCurrent: 1, // 后台获取页
|
||||
dialogmethod: false, // false新增 true 编辑
|
||||
proceductnummax: 0
|
||||
// total1: 0, // 总条数
|
||||
// pageSize1: 10, // 每页显示条数
|
||||
// pageCurrent1: 1, // 后台获取页
|
||||
// total2: 0, // 总条数
|
||||
// pageSize2: 10, // 每页显示条数
|
||||
// pageCurrent2: 1 // 后台获取页
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
'sidebar',
|
||||
'avatar',
|
||||
'name',
|
||||
'id' // 人员编号
|
||||
])
|
||||
},
|
||||
created() {
|
||||
},
|
||||
mounted() {
|
||||
this.searchTable1()
|
||||
this.initProject()
|
||||
this.QualityType()
|
||||
this.fetchData()
|
||||
this.fetchData1()
|
||||
},
|
||||
methods: {
|
||||
// 合计
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param
|
||||
const sums = []
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总价'
|
||||
} else if (index === 3) {
|
||||
const values = data.map(item => Number(item['批次数量']) || 0)
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return Number((prev + curr).toFixed(2))
|
||||
// 表内编辑取消
|
||||
cancel(row) {
|
||||
row.edit = !row.edit
|
||||
console.log(row, 8888)
|
||||
row.备注 = row.备注_原
|
||||
row.不合格数量 = row.不合格数量_原
|
||||
row.是否合格 = row.是否合格_原
|
||||
row.数量 = row.数量_原
|
||||
row.不合格原因文本 = row.不合格原因文本_原
|
||||
row.不合格处理文本 = row.不合格处理文本_原
|
||||
},
|
||||
// 表内编辑确定
|
||||
confirmEdit(row) {
|
||||
console.log(this.$store.state.user.id, 787878)
|
||||
confirmEdit(row.质检流水号, row.质检类型代码, row.零部件流水号, row.是否合格, row.数量, row.不合格数量, row.不合格原因, row.处理结果, row.备注, this.$store.state.user.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('编辑成功')
|
||||
this.selecttable()
|
||||
} else {
|
||||
return Number((prev).toFixed(2))
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ''
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
} else if (index === 4) {
|
||||
const values = data.map(item => Number(item['数量']) || 0)
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return Number((prev + curr).toFixed(2))
|
||||
} else {
|
||||
return Number((prev).toFixed(2))
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ''
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
} else if (index === 5) {
|
||||
const values = data.map(item => Number(item['不合格数量']) || 0)
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr)
|
||||
if (!isNaN(value)) {
|
||||
return Number((prev + curr).toFixed(2))
|
||||
} else {
|
||||
return Number((prev).toFixed(2))
|
||||
}
|
||||
}, 0)
|
||||
sums[index] += ''
|
||||
} else {
|
||||
sums[index] = 'N/A'
|
||||
}
|
||||
} else if (index === 6) {
|
||||
sums[index] = '检验比例:' + ((sums[4] / sums[3]) * 100).toFixed(2) + '%'
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
return sums
|
||||
row.edit = false
|
||||
},
|
||||
// 查询到货单列表
|
||||
searchTable1() {
|
||||
let check1, check2
|
||||
this.orderNumber ? check1 = 1 : check1 = 0
|
||||
this.outsourcingSupplier ? check2 = 1 : check2 = 0
|
||||
searchTable1(check1, this.orderNumber, check2, this.outsourcingSupplier).then(response => {
|
||||
this.tableData1 = response.data
|
||||
// 删除质检
|
||||
deleterow(row) {
|
||||
// this.plan = row.计划流水号
|
||||
console.log(row, 4545)
|
||||
this.$confirm('是否删除该质检记录?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleterow(row.质检流水号, row.质检类型代码, row.零部件流水号, row.数量).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('删除成功')
|
||||
this.selecttable()
|
||||
} else {
|
||||
this.$message.error('编辑失败')
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
initProject() {
|
||||
initProject().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.machineNumber.push({
|
||||
label: response.data[i].机床图号,
|
||||
name: response.data[i].项目名称,
|
||||
value: response.data[i].机床流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
QualityType() {
|
||||
QualityType().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.QualityTypeNumber.push({
|
||||
label: response.data[i].质检类型,
|
||||
value: response.data[i].质检类型代码
|
||||
})
|
||||
}
|
||||
})
|
||||
initPerson().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.person.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
initDisqualificationTreatment().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.disqualificationTreatment.push({
|
||||
label: response.data[i].不合格处理文本,
|
||||
value: response.data[i].不合格处理
|
||||
})
|
||||
}
|
||||
})
|
||||
initReasonsForNonconformity().then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.reasonsForNonconformity.push({
|
||||
label: response.data[i].不合格原因文本,
|
||||
value: response.data[i].不合格原因
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
approvalPass(row) {
|
||||
this.$confirm('是否禁用?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
Prohibit(row.质检流水号, row.质检类型代码).then(res => {
|
||||
if (res.data[0].result === '1') {
|
||||
this.$message.success('操作成功')
|
||||
this.selecttable()
|
||||
} else {
|
||||
this.$message.error('操作失败')
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消操作'
|
||||
})
|
||||
})
|
||||
},
|
||||
// 删除
|
||||
handleEdit(row) {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
console.log(row, 8989)
|
||||
this.partNum = []
|
||||
this.groupNumber = []
|
||||
this.procedureNum = []
|
||||
this.operators = []
|
||||
this.AddTableData_disable = false
|
||||
this.dialogmethod = true // 编辑置为true
|
||||
this.dialogFormVisible10 = true
|
||||
},
|
||||
// 新增
|
||||
AddTableData() {
|
||||
if (this.$refs['form2'] !== undefined) {
|
||||
this.$refs['form2'].resetFields()
|
||||
}
|
||||
this.partNum = []
|
||||
this.groupNumber = []
|
||||
this.procedureNum = []
|
||||
this.operators = []
|
||||
this.AddTableData_disable = false
|
||||
this.dialogmethod = false // 新增置为false
|
||||
this.dialogFormVisible10 = true
|
||||
},
|
||||
formatJson(filterVal, jsonData) {
|
||||
return jsonData.map(v => filterVal.map(j => {
|
||||
return v[j]
|
||||
}))
|
||||
},
|
||||
exportExcel() {
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
|
||||
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.SpareParts !== '' && this.SpareParts !== null) { this.check3 = 1 } else { this.check3 = 0 }
|
||||
if (this.QualityTypeValue !== '' && this.QualityTypeValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
|
||||
if (this.startTime !== '' && this.startTime !== null) { this.check5 = 1 } else { this.check5 = 0 }
|
||||
if (this.endTime !== '' && this.endTime !== null) { this.check6 = 1 } else { this.check6 = 0 }
|
||||
if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check7 = 1 } else { this.check7 = 0 }
|
||||
if (this.personNum !== '' && this.personNum !== null) { this.check8 = 1 } else { this.check8 = 0 }
|
||||
var param = []
|
||||
param[0] = ['机床流水号_check', this.check1]
|
||||
param[1] = ['机床流水号', this.machineNumberValue]
|
||||
param[2] = ['组件流水号_check', this.check2]
|
||||
param[3] = ['组件流水号', this.groupNumberValue]
|
||||
param[4] = ['零件名称_check', this.check3]
|
||||
param[5] = ['零件名称', this.SpareParts]
|
||||
param[6] = ['质检类型代码_check', this.check4]
|
||||
param[7] = ['质检类型代码', this.QualityTypeValue]
|
||||
param[8] = ['开始时间_check', this.check5]
|
||||
param[9] = ['开始时间', this.startTime]
|
||||
param[10] = ['结束时间_check', this.check6]
|
||||
param[11] = ['结束时间', this.endTime]
|
||||
param[12] = ['质检情况_check', this.check7]
|
||||
param[13] = ['质检情况', this.qualityInspectionValue]
|
||||
param[14] = ['人员编号_check', this.check8]
|
||||
param[15] = ['人员编号', this.personNum]
|
||||
var Data = this.CreateData('2001', '报表_质检管理_工序外协件_查询数据', param)
|
||||
this.exportExcel_NPOI(Data)
|
||||
},
|
||||
// exportExcel1() {
|
||||
// if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
|
||||
// if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
// if (this.SpareParts !== '' && this.SpareParts !== null) { this.check3 = 1 } else { this.check3 = 0 }
|
||||
// if (this.QualityTypeValue !== '' && this.QualityTypeValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
|
||||
// if (this.startTime !== '' && this.startTime !== null) { this.check5 = 1 } else { this.check5 = 0 }
|
||||
// if (this.endTime !== '' && this.endTime !== null) { this.check6 = 1 } else { this.check6 = 0 }
|
||||
// if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check7 = 1 } else { this.check7 = 0 }
|
||||
// if (this.personNum !== '' && this.personNum !== null) { this.check8 = 1 } else { this.check8 = 0 }
|
||||
// selecttable22(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.SpareParts, this.check4, this.QualityTypeValue, this.check5, this.startTime, this.check6, this.endTime, this.check7, this.qualityInspectionValue, this.check8, this.personNum).then(response => {
|
||||
// import('@/vendor/Export2Excel').then(excel => {
|
||||
// const tHeader = ['是否禁用', '机床图号', '机床名称', '组号', '零件图号', '零件名称', '零件数量', '规格或材料', '工序名称', '质检类型', '检验数量', '不合格数量', '不合格原因', '处理结果', '质检时间', '备注']
|
||||
// const filterVal = ['禁用情况', '机床图号', '机床名称', '组号', '零件图号', '零件名称', '零件数量', '规格或材料', '工艺名称', '质检类型', '数量', '不合格数量', '不合格原因文本', '不合格处理文本', '操作时间', '备注']
|
||||
// const list = response.data
|
||||
// const data = this.formatJson(filterVal, list)
|
||||
// excel.export_json_to_excel({
|
||||
// header: tHeader,
|
||||
// data,
|
||||
// filename: '质检情况表',
|
||||
// autoWidth: true,
|
||||
// bookType: 'xlsx'
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
// },
|
||||
fetchData() {
|
||||
searchData().then(response => {
|
||||
this.tableData10 = response.data
|
||||
this.total1 = response.data.total
|
||||
})
|
||||
},
|
||||
// handleSizeChange1(val) {
|
||||
// this.pageSize1 = val
|
||||
// this.pageCurrent1 = 1
|
||||
// this.searchTable1()
|
||||
// },
|
||||
// handleCurrentChange1(val) {
|
||||
// this.pageCurrent1 = val
|
||||
// this.searchTable1()
|
||||
// },
|
||||
searchTable2(row) {
|
||||
searchTable2(row.外协到货单流水号).then(response => {
|
||||
this.tableData2 = response.data
|
||||
fetchData1() {
|
||||
searchData1().then(response => {
|
||||
console.log(response)
|
||||
this.tableData20 = response.data
|
||||
this.total2 = response.data.total
|
||||
})
|
||||
},
|
||||
machineChange() {
|
||||
this.groupNumberValue = ''
|
||||
this.groupNumber = []
|
||||
searchgroup(this.machineNumberValue).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.groupNumber.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
machineChange1() {
|
||||
this.form2.组号 = ''
|
||||
this.groupNumber1 = []
|
||||
searchgroup(this.form2.机床图号).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.groupNumber1.push({
|
||||
label: response.data[i].组号,
|
||||
value: response.data[i].组件流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
groupChange() {
|
||||
this.form2.零件图号 = ''
|
||||
this.partNum = []
|
||||
searchparts(this.form2.组号).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.partNum.push({
|
||||
label: response.data[i].零件图号,
|
||||
value: response.data[i].工艺计划流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
partChange() {
|
||||
this.form2.工序 = ''
|
||||
this.procedureNum = []
|
||||
searchproceductnum(this.form2.零件图号).then(response => {
|
||||
this.proceductnummax = response.data[0].批次数量
|
||||
})
|
||||
searchprocedure(this.form2.零件图号).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.procedureNum.push({
|
||||
label: response.data[i].工艺名称,
|
||||
value: response.data[i].工序流水号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
procedureChange() {
|
||||
searchoperators(this.form2.工序).then(response => {
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
this.operators.push({
|
||||
label: response.data[i].姓名,
|
||||
value: response.data[i].人员编号
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
submitTable() {
|
||||
this.$refs['form2'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.AddTableData_disable = true
|
||||
submitTable(this.form2.工序, this.form2.质检类型, this.form2.检测数, this.form2.质检情况, this.id, this.form2.不合格数量, this.form2.不合格原因, this.form2.不合格处理, this.form2.备注, this.form2.操作工, this.$store.state.user.id).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.dialogFormVisible10 = false
|
||||
this.$message.success('新增成功')
|
||||
this.selecttable()
|
||||
} else {
|
||||
this.$message.error('新增失败')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
searchTableDetail(type, num) {
|
||||
searchTableDetail(type, num).then(response => {
|
||||
this.gridData = response.data
|
||||
})
|
||||
console.log(type)
|
||||
},
|
||||
selecttable() {
|
||||
this.loading = true
|
||||
this.tableData1 = []
|
||||
if (this.machineNumberValue !== '' && this.machineNumberValue !== null) { this.check1 = 1 } else { this.check1 = 0 }
|
||||
if (this.groupNumberValue !== '' && this.groupNumberValue !== null) { this.check2 = 1 } else { this.check2 = 0 }
|
||||
if (this.SpareParts !== '' && this.SpareParts !== null) { this.check3 = 1 } else { this.check3 = 0 }
|
||||
if (this.QualityTypeValue !== '' && this.QualityTypeValue !== null) { this.check4 = 1 } else { this.check4 = 0 }
|
||||
if (this.startTime !== '' && this.startTime !== null) { this.check5 = 1 } else { this.check5 = 0 }
|
||||
if (this.endTime !== '' && this.endTime !== null) { this.check6 = 1 } else { this.check6 = 0 }
|
||||
if (this.qualityInspectionValue !== '' && this.qualityInspectionValue !== null) { this.check7 = 1 } else { this.check7 = 0 }
|
||||
if (this.personNum !== '' && this.personNum !== null) { this.check8 = 1 } else { this.check8 = 0 }
|
||||
selecttable(this.check1, this.machineNumberValue, this.check2, this.groupNumberValue, this.check3, this.SpareParts, this.check4, this.QualityTypeValue, this.check5, this.startTime, this.check6, this.endTime, this.check7, this.qualityInspectionValue, this.check8, this.personNum, this.pageCurrent, this.pageSize).then(response => {
|
||||
this.tableData1 = response.data.result
|
||||
this.tableData1.map(v => {
|
||||
this.$set(v, 'edit', false)
|
||||
this.$set(v, '备注_原', v.备注)
|
||||
this.$set(v, '不合格数量_原', v.不合格数量)
|
||||
this.$set(v, '是否合格_原', v.是否合格)
|
||||
this.$set(v, '数量_原', v.数量)
|
||||
this.$set(v, '不合格原因文本_原', v.不合格原因文本)
|
||||
this.$set(v, '不合格处理文本_原', v.不合格处理文本)
|
||||
})
|
||||
console.log(this.tableData1, 8979)
|
||||
this.loading = false
|
||||
this.total = parseInt(response.data.output[0].ItemCount)
|
||||
})
|
||||
},
|
||||
viewPicture(row) {
|
||||
this.dialogFormVisible = true
|
||||
this.urls = []
|
||||
searchPic(row.质检流水号).then(response => {
|
||||
// this.URL = readFile + response.data[0].文件标识 + '.' + response.data[0].文件后缀
|
||||
for (let i = 0; i < response.data.length; i++) {
|
||||
if (response.data[i].文件内容 !== null) {
|
||||
// this.urls.push(readFile + response.data[i].文件标识 + '.' + response.data[i].文件后缀)
|
||||
this.urls.push('data:image/png;base64,' + response.data[i].文件内容)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
viewProcedures(row) {
|
||||
this.dialogFormVisible4 = true
|
||||
this.SparePartsNumber = row.零件图号
|
||||
this.SparePartsName = row.零件名称
|
||||
processingStatus(row.工艺计划流水号).then(response => {
|
||||
this.tableData5 = response.data
|
||||
})
|
||||
},
|
||||
// 分页
|
||||
handleSizeChange(val) {
|
||||
this.pageCurrent = 1
|
||||
this.pageSize = val
|
||||
this.selecttable()
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.pageCurrent = val
|
||||
this.selecttable()
|
||||
}
|
||||
// handleSizeChange1(val) {
|
||||
// this.pageCurrent1 = 1
|
||||
// this.pageSize1 = val
|
||||
// this.fetchData()
|
||||
// },
|
||||
// handleCurrentChange1(val) {
|
||||
// this.pageCurrent1 = val
|
||||
// this.fetchData()
|
||||
// },
|
||||
// handleSizeChange2(val) {
|
||||
// this.pageCurrent2 = 1
|
||||
// this.pageSize2 = val
|
||||
// this.fetchData1()
|
||||
// },
|
||||
// handleCurrentChange2(val) {
|
||||
// this.pageCurrent2 = val
|
||||
// this.fetchData1()
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
h3{
|
||||
margin: 5px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -62,10 +62,10 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-button slot="reference" type="text" size="mini" icon="el-icon-search" style="margin-right: 10px" plain @click="searchTable01(scope.row)">查看详情</el-button>
|
||||
<el-button slot="reference" type="text" size="mini" icon="el-icon-search" style="margin-right: 10px;padding: 10px" plain @click="searchTable01(scope.row)">查看详情</el-button>
|
||||
</el-popover>
|
||||
<el-button type="text" size="mini" icon="el-icon-check" plain @click="yesApproval(scope.row)">通过</el-button>
|
||||
<el-button type="text" size="mini" icon="el-icon-close" plain @click="noApproval(scope.row)">不通过</el-button>
|
||||
<el-button type="text" size="mini" icon="el-icon-check" style="margin-right: 10px;padding:10px" plain @click="yesApproval(scope.row)">通过</el-button>
|
||||
<el-button type="text" size="mini" icon="el-icon-close" style="margin-right: 10px;padding: 10px;color:black" plain @click="noApproval(scope.row)">不通过</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
Reference in New Issue
Block a user