|
|
@ -1,8 +1,19 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="app-container">
|
|
|
|
<div class="app-container">
|
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="80px">
|
|
|
|
<el-form
|
|
|
|
|
|
|
|
:model="queryParams"
|
|
|
|
|
|
|
|
ref="queryForm"
|
|
|
|
|
|
|
|
size="small"
|
|
|
|
|
|
|
|
:inline="true"
|
|
|
|
|
|
|
|
v-show="showSearch"
|
|
|
|
|
|
|
|
label-width="80px"
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-form-item label="检验节点" prop="checkType">
|
|
|
|
<el-form-item label="检验节点" prop="checkType">
|
|
|
|
<el-select v-model="queryParams.checkType" clearable placeholder="请选择检验节点">
|
|
|
|
<el-select
|
|
|
|
|
|
|
|
v-model="queryParams.checkType"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
placeholder="请选择检验节点"
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="dict in checkTypes"
|
|
|
|
v-for="dict in checkTypes"
|
|
|
|
:key="dict.id"
|
|
|
|
:key="dict.id"
|
|
|
@ -52,7 +63,6 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="生产时间" prop="incomeTimeArray">
|
|
|
|
<el-form-item label="生产时间" prop="incomeTimeArray">
|
|
|
|
<el-date-picker
|
|
|
|
<el-date-picker
|
|
|
|
v-model="queryParams.incomeTimeArray"
|
|
|
|
v-model="queryParams.incomeTimeArray"
|
|
|
@ -60,7 +70,8 @@
|
|
|
|
type="datetimerange"
|
|
|
|
type="datetimerange"
|
|
|
|
range-separator="至"
|
|
|
|
range-separator="至"
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
end-placeholder="结束日期">
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
@ -88,7 +99,8 @@
|
|
|
|
type="datetimerange"
|
|
|
|
type="datetimerange"
|
|
|
|
range-separator="至"
|
|
|
|
range-separator="至"
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
end-placeholder="结束日期">
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="检验结果" prop="checkResult">
|
|
|
|
<el-form-item label="检验结果" prop="checkResult">
|
|
|
@ -106,8 +118,16 @@
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
|
<el-button
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</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-item>
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
@ -120,7 +140,8 @@
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
@click="handleAdd"
|
|
|
|
@click="handleAdd"
|
|
|
|
v-hasPermi="['quality:qcProduce:add']"
|
|
|
|
v-hasPermi="['quality:qcProduce:add']"
|
|
|
|
>新增</el-button>
|
|
|
|
>新增</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
@ -132,7 +153,8 @@
|
|
|
|
:disabled="single"
|
|
|
|
:disabled="single"
|
|
|
|
@click="handleUpdate"
|
|
|
|
@click="handleUpdate"
|
|
|
|
v-hasPermi="['quality:qcProduce:edit']"
|
|
|
|
v-hasPermi="['quality:qcProduce:edit']"
|
|
|
|
>修改</el-button>
|
|
|
|
>修改</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<!--
|
|
|
|
<!--
|
|
|
|
<el-col :span="1.5">
|
|
|
|
<el-col :span="1.5">
|
|
|
@ -154,33 +176,104 @@
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
|
@click="handleExport"
|
|
|
|
@click="handleExport"
|
|
|
|
v-hasPermi="['quality:qcProduce:export']"
|
|
|
|
v-hasPermi="['quality:qcProduce:export']"
|
|
|
|
>导出</el-button>
|
|
|
|
>导出</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
<right-toolbar
|
|
|
|
|
|
|
|
:showSearch.sync="showSearch"
|
|
|
|
|
|
|
|
@queryTable="getList"
|
|
|
|
|
|
|
|
></right-toolbar>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="qcProduceList" @selection-change="handleSelectionChange">
|
|
|
|
<el-table
|
|
|
|
|
|
|
|
v-loading="loading"
|
|
|
|
|
|
|
|
:data="qcProduceList"
|
|
|
|
|
|
|
|
@selection-change="handleSelectionChange"
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
<el-table-column label="id" align="center" prop="recordId" v-if="false"/>
|
|
|
|
<el-table-column label="id" align="center" prop="recordId" v-if="false" />
|
|
|
|
<el-table-column label="checkType" align="center" prop="checkType" v-if="false"/>
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column label="任务编号" align="center" prop="checkNo" width="120"/>
|
|
|
|
label="checkType"
|
|
|
|
<el-table-column label="批次号" align="center" prop="incomeBatchNo" width="200" :show-overflow-tooltip="true" />
|
|
|
|
align="center"
|
|
|
|
<el-table-column label="订单号" align="center" prop="orderNo" width="130"/>
|
|
|
|
prop="checkType"
|
|
|
|
<el-table-column label="物料号" align="center" prop="materialCode" width="170"/>
|
|
|
|
v-if="false"
|
|
|
|
<el-table-column label="物料名称" align="center" prop="materialName" width="250" :show-overflow-tooltip="true" />
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="任务编号"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="checkNo"
|
|
|
|
|
|
|
|
width="120"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<el-button type="text" @click="handleView(scope.row)">{{
|
|
|
|
|
|
|
|
scope.row.checkNo
|
|
|
|
|
|
|
|
}}</el-button>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="批次号"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="incomeBatchNo"
|
|
|
|
|
|
|
|
width="200"
|
|
|
|
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="订单号"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="orderNo"
|
|
|
|
|
|
|
|
width="130"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="物料号"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="materialCode"
|
|
|
|
|
|
|
|
width="170"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="物料名称"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="materialName"
|
|
|
|
|
|
|
|
width="250"
|
|
|
|
|
|
|
|
:show-overflow-tooltip="true"
|
|
|
|
|
|
|
|
/>
|
|
|
|
<el-table-column label="数量" align="center" prop="quality" />
|
|
|
|
<el-table-column label="数量" align="center" prop="quality" />
|
|
|
|
<el-table-column label="抽样数量" align="center" prop="sampleQuality" />
|
|
|
|
<el-table-column label="抽样数量" align="center" prop="sampleQuality" />
|
|
|
|
<el-table-column label="不合格数量" align="center" prop="noOkQuality" width="120"/>
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="不合格数量"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="noOkQuality"
|
|
|
|
|
|
|
|
width="120"
|
|
|
|
|
|
|
|
/>
|
|
|
|
<el-table-column label="单位" align="center" prop="unit" />
|
|
|
|
<el-table-column label="单位" align="center" prop="unit" />
|
|
|
|
<el-table-column label="车间编码" align="center" prop="supplierCode" width="120"/>
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column label="车间名称" align="center" prop="supplierName" width="170"/>
|
|
|
|
label="车间编码"
|
|
|
|
<el-table-column label="生产时间" align="center" prop="incomeTime" width="150">
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="supplierCode"
|
|
|
|
|
|
|
|
width="120"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="车间名称"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="supplierName"
|
|
|
|
|
|
|
|
width="170"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="生产时间"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="incomeTime"
|
|
|
|
|
|
|
|
width="150"
|
|
|
|
|
|
|
|
>
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
<span>{{ parseTime(scope.row.incomeTime, "{y}-{m}-{d}") }}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="检测地点" align="center" prop="checkLoc" width="120"/>
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column label="检测状态" align="center" prop="checkStatus" >
|
|
|
|
label="检测地点"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="checkLoc"
|
|
|
|
|
|
|
|
width="120"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column label="检测状态" align="center" prop="checkStatus">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<dict-tag
|
|
|
|
<dict-tag
|
|
|
|
:options="dict.type.check_status"
|
|
|
|
:options="dict.type.check_status"
|
|
|
@ -188,17 +281,41 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="检测人工号" align="center" prop="checkManCode" width="100" />
|
|
|
|
<el-table-column
|
|
|
|
<el-table-column label="检测人姓名" align="center" prop="checkManName" width="100"/>
|
|
|
|
label="检测人工号"
|
|
|
|
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="checkManCode"
|
|
|
|
|
|
|
|
width="100"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="检测人姓名"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="checkManName"
|
|
|
|
|
|
|
|
width="100"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="检验时间"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="checkTime"
|
|
|
|
|
|
|
|
width="180"
|
|
|
|
|
|
|
|
>
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
<span>{{
|
|
|
|
|
|
|
|
parseTime(scope.row.checkTime, "{y}-{m}-{d} {h}:{i}:{s}")
|
|
|
|
|
|
|
|
}}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="检验节点" align="center" prop="checkName" />
|
|
|
|
<el-table-column label="检验节点" align="center" prop="checkName" />
|
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="创建时间"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="createTime"
|
|
|
|
|
|
|
|
width="180"
|
|
|
|
|
|
|
|
>
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
|
|
|
<span>{{
|
|
|
|
|
|
|
|
parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}:{s}")
|
|
|
|
|
|
|
|
}}</span>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="检验结果" align="center" prop="checkResult" />
|
|
|
|
<el-table-column label="检验结果" align="center" prop="checkResult" />
|
|
|
@ -212,7 +329,11 @@
|
|
|
|
></el-switch>
|
|
|
|
></el-switch>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="操作"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
class-name="small-padding fixed-width"
|
|
|
|
|
|
|
|
>
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<template slot-scope="scope">
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
@ -220,7 +341,14 @@
|
|
|
|
icon="el-icon-edit"
|
|
|
|
icon="el-icon-edit"
|
|
|
|
@click="handleCheckProject(scope.row)"
|
|
|
|
@click="handleCheckProject(scope.row)"
|
|
|
|
v-hasPermi="['quality:qcProduce:edit']"
|
|
|
|
v-hasPermi="['quality:qcProduce:edit']"
|
|
|
|
>检验</el-button>
|
|
|
|
>检验</el-button
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<!--检验项目弹窗-->
|
|
|
|
|
|
|
|
<ItemSelectProject
|
|
|
|
|
|
|
|
ref="itemSelectProject"
|
|
|
|
|
|
|
|
@saveCheck="saveCheck"
|
|
|
|
|
|
|
|
:checkStatus="scope.row.checkStatus"
|
|
|
|
|
|
|
|
></ItemSelectProject>
|
|
|
|
<!--
|
|
|
|
<!--
|
|
|
|
<el-button
|
|
|
|
<el-button
|
|
|
|
size="mini"
|
|
|
|
size="mini"
|
|
|
@ -234,7 +362,7 @@
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
<pagination
|
|
|
|
v-show="total>0"
|
|
|
|
v-show="total > 0"
|
|
|
|
:total="total"
|
|
|
|
:total="total"
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
:page.sync="queryParams.pageNum"
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
|
:limit.sync="queryParams.pageSize"
|
|
|
@ -242,17 +370,30 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改生产过程检验任务对话框 -->
|
|
|
|
<!-- 添加或修改生产过程检验任务对话框 -->
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
|
|
|
<el-dialog
|
|
|
|
|
|
|
|
:title="title"
|
|
|
|
|
|
|
|
:visible.sync="open"
|
|
|
|
|
|
|
|
width="1000px"
|
|
|
|
|
|
|
|
append-to-body
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="检验任务编号" prop="checkNo">
|
|
|
|
<el-form-item label="检验任务编号" prop="checkNo">
|
|
|
|
<el-input v-model="form.checkNo" placeholder="请输入检验任务编号" disabled/>
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="form.checkNo"
|
|
|
|
|
|
|
|
placeholder="请输入检验任务编号"
|
|
|
|
|
|
|
|
disabled
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="检验类型" prop="checkType" >
|
|
|
|
<el-form-item label="检验类型" prop="checkType">
|
|
|
|
<el-select v-model="form.checkType" placeholder="请选择检验类型" style="width: 100%;">
|
|
|
|
<el-select
|
|
|
|
|
|
|
|
v-model="form.checkType"
|
|
|
|
|
|
|
|
placeholder="请选择检验类型"
|
|
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="dict in checkTypes"
|
|
|
|
v-for="dict in checkTypes"
|
|
|
|
:key="dict.id"
|
|
|
|
:key="dict.id"
|
|
|
@ -264,8 +405,12 @@
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="订单号" prop="orderNo">
|
|
|
|
<el-form-item label="订单号" prop="orderNo">
|
|
|
|
<el-input v-model="form.orderNo" placeholder="请选择订单号" >
|
|
|
|
<el-input v-model="form.orderNo" placeholder="请选择订单号">
|
|
|
|
<el-button slot="append" @click="handleSelectWorkOrder" icon="el-icon-search"></el-button>
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
slot="append"
|
|
|
|
|
|
|
|
@click="handleSelectWorkOrder"
|
|
|
|
|
|
|
|
icon="el-icon-search"
|
|
|
|
|
|
|
|
></el-button>
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
@ -273,37 +418,54 @@
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
<el-form-item label="物料名称" prop="materialName">
|
|
|
|
<el-input v-model="form.materialName" placeholder="请选择物料名称"/>
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="form.materialName"
|
|
|
|
|
|
|
|
placeholder="请选择物料名称"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="物料号" prop="materialCode">
|
|
|
|
<el-form-item label="物料号" prop="materialCode">
|
|
|
|
<el-input v-model="form.materialCode" placeholder="请输入物料号"/>
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="form.materialCode"
|
|
|
|
|
|
|
|
placeholder="请输入物料号"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="生产数量" prop="quality">
|
|
|
|
<el-form-item label="生产数量" prop="quality">
|
|
|
|
<el-input type="number" v-model="form.quality" placeholder="请输入生产数量" disabled/>
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
type="number"
|
|
|
|
|
|
|
|
v-model="form.quality"
|
|
|
|
|
|
|
|
placeholder="请输入生产数量"
|
|
|
|
|
|
|
|
disabled
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="生产时间" prop="incomeTime">
|
|
|
|
<el-form-item label="生产时间" prop="incomeTime">
|
|
|
|
<el-date-picker clearable
|
|
|
|
<el-date-picker
|
|
|
|
|
|
|
|
clearable
|
|
|
|
v-model="form.incomeTime"
|
|
|
|
v-model="form.incomeTime"
|
|
|
|
type="datetime"
|
|
|
|
type="datetime"
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
|
placeholder="请选择生产时间">
|
|
|
|
placeholder="请选择生产时间"
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="单位" prop="unit" >
|
|
|
|
<el-form-item label="单位" prop="unit">
|
|
|
|
<el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;">
|
|
|
|
<el-select
|
|
|
|
|
|
|
|
v-model="form.unit"
|
|
|
|
|
|
|
|
placeholder="请选择单位"
|
|
|
|
|
|
|
|
style="width: 100%"
|
|
|
|
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
<el-option
|
|
|
|
v-for="dict in dict.type.unit"
|
|
|
|
v-for="dict in dict.type.unit"
|
|
|
|
:key="dict.value"
|
|
|
|
:key="dict.value"
|
|
|
@ -316,11 +478,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="批次号" prop="incomeBatchNo">
|
|
|
|
<el-form-item label="批次号" prop="incomeBatchNo">
|
|
|
|
<el-select v-model="form.incomeBatchNo" class="selectItem" placeholder="请选择批次" clearable>
|
|
|
|
<el-select
|
|
|
|
<el-option v-for="(item,index) in batchList"
|
|
|
|
v-model="form.incomeBatchNo"
|
|
|
|
|
|
|
|
class="selectItem"
|
|
|
|
|
|
|
|
placeholder="请选择批次"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="(item, index) in batchList"
|
|
|
|
:key="index"
|
|
|
|
:key="index"
|
|
|
|
:label="item.batchCode"
|
|
|
|
:label="item.batchCode"
|
|
|
|
:value="item.batchCode">
|
|
|
|
:value="item.batchCode"
|
|
|
|
|
|
|
|
>
|
|
|
|
</el-option>
|
|
|
|
</el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -329,45 +498,79 @@
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-col :span="6">
|
|
|
|
<el-form-item label="抽样数量" prop="sampleQuality">
|
|
|
|
<el-form-item label="抽样数量" prop="sampleQuality">
|
|
|
|
<el-input type="number" v-model="form.sampleQuality" placeholder="请输入抽样数量" />
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
type="number"
|
|
|
|
|
|
|
|
v-model="form.sampleQuality"
|
|
|
|
|
|
|
|
placeholder="请输入抽样数量"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="6" v-for="(item,index) in form.defects" :key="index">
|
|
|
|
<el-col :span="6" v-for="(item, index) in form.defects" :key="index">
|
|
|
|
<el-form-item :label="item.defectSubclass" prop="">
|
|
|
|
<el-form-item :label="item.defectSubclass" prop="">
|
|
|
|
<el-input type="number" v-model="item.noOkQuality" placeholder="请输入不合格数量" />
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
type="number"
|
|
|
|
|
|
|
|
v-model="item.noOkQuality"
|
|
|
|
|
|
|
|
placeholder="请输入不合格数量"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="车间名称" prop="supplierName">
|
|
|
|
<el-form-item label="车间名称" prop="supplierName">
|
|
|
|
<el-input v-model="form.supplierName" placeholder="请输入所属车间名称" >
|
|
|
|
<el-input
|
|
|
|
<el-button slot="append" @click="handleSelectWorkCenter" icon="el-icon-search"></el-button>
|
|
|
|
v-model="form.supplierName"
|
|
|
|
|
|
|
|
placeholder="请输入所属车间名称"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
slot="append"
|
|
|
|
|
|
|
|
@click="handleSelectWorkCenter"
|
|
|
|
|
|
|
|
icon="el-icon-search"
|
|
|
|
|
|
|
|
></el-button>
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="车间编码" prop="supplierCode">
|
|
|
|
<el-form-item label="车间编码" prop="supplierCode">
|
|
|
|
<el-input v-model="form.supplierCode" placeholder="请输入所属车间编码" disabled/>
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="form.supplierCode"
|
|
|
|
|
|
|
|
placeholder="请输入所属车间编码"
|
|
|
|
|
|
|
|
disabled
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="抽样数量" prop="sampleQuality">
|
|
|
|
<el-form-item label="抽样数量" prop="sampleQuality">
|
|
|
|
<el-input type="number" v-model="form.sampleQuality" placeholder="请输入抽样数量" />
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
type="number"
|
|
|
|
|
|
|
|
v-model="form.sampleQuality"
|
|
|
|
|
|
|
|
placeholder="请输入抽样数量"
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="检测人姓名" prop="checkManName">
|
|
|
|
<el-form-item label="检测人姓名" prop="checkManName">
|
|
|
|
<el-input v-model="form.checkManName" placeholder="请选择检测人姓名">
|
|
|
|
<el-input
|
|
|
|
<el-button slot="append" @click="handleSelectUser" icon="el-icon-search"></el-button>
|
|
|
|
v-model="form.checkManName"
|
|
|
|
|
|
|
|
placeholder="请选择检测人姓名"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
slot="append"
|
|
|
|
|
|
|
|
@click="handleSelectUser"
|
|
|
|
|
|
|
|
icon="el-icon-search"
|
|
|
|
|
|
|
|
></el-button>
|
|
|
|
</el-input>
|
|
|
|
</el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-form-item label="检测人工号" prop="checkManCode" >
|
|
|
|
<el-form-item label="检测人工号" prop="checkManCode">
|
|
|
|
<el-input v-model="form.checkManCode" placeholder="请输入检测人工号" disabled/>
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="form.checkManCode"
|
|
|
|
|
|
|
|
placeholder="请输入检测人工号"
|
|
|
|
|
|
|
|
disabled
|
|
|
|
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
</el-col>
|
|
|
|
<el-col :span="8">
|
|
|
|
<el-col :span="8">
|
|
|
@ -397,19 +600,21 @@
|
|
|
|
ref="itemSelectUser"
|
|
|
|
ref="itemSelectUser"
|
|
|
|
@onSelected="onSelectUser"
|
|
|
|
@onSelected="onSelectUser"
|
|
|
|
></ItemSelectUser>
|
|
|
|
></ItemSelectUser>
|
|
|
|
<!--检验项目弹窗-->
|
|
|
|
|
|
|
|
<ItemSelectProject
|
|
|
|
|
|
|
|
ref="itemSelectProject"
|
|
|
|
|
|
|
|
@saveCheck="saveCheck"
|
|
|
|
|
|
|
|
></ItemSelectProject>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { listQcProduce, getQcProduce, delQcProduce, addQcProduce, updateQcProduce,
|
|
|
|
import {
|
|
|
|
getCheckTypes,changeProduceStatus,getBatchList
|
|
|
|
listQcProduce,
|
|
|
|
|
|
|
|
getQcProduce,
|
|
|
|
|
|
|
|
delQcProduce,
|
|
|
|
|
|
|
|
addQcProduce,
|
|
|
|
|
|
|
|
updateQcProduce,
|
|
|
|
|
|
|
|
getCheckTypes,
|
|
|
|
|
|
|
|
changeProduceStatus,
|
|
|
|
|
|
|
|
getBatchList,
|
|
|
|
} from "@/api/quality/qcProduce";
|
|
|
|
} from "@/api/quality/qcProduce";
|
|
|
|
import moment from 'moment';
|
|
|
|
import moment from "moment";
|
|
|
|
import ItemSelectWorkOrder from "./selectWorkOrder.vue";
|
|
|
|
import ItemSelectWorkOrder from "./selectWorkOrder.vue";
|
|
|
|
import ItemSelectWorkCenter from "./selectWorkCenter.vue";
|
|
|
|
import ItemSelectWorkCenter from "./selectWorkCenter.vue";
|
|
|
|
import ItemSelectUser from "../qcIncome/selectUser.vue";
|
|
|
|
import ItemSelectUser from "../qcIncome/selectUser.vue";
|
|
|
@ -417,8 +622,13 @@ import ItemSelectProject from "../qcIncome/checkProjectType.vue";
|
|
|
|
import { getDefectTypeListByDefectType } from "@/api/quality/defectType.js";
|
|
|
|
import { getDefectTypeListByDefectType } from "@/api/quality/defectType.js";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "QcProduce",
|
|
|
|
name: "QcProduce",
|
|
|
|
components: { ItemSelectWorkCenter,ItemSelectUser,ItemSelectProject,ItemSelectWorkOrder},
|
|
|
|
components: {
|
|
|
|
dicts: ["unit","check_status","check_result"],
|
|
|
|
ItemSelectWorkCenter,
|
|
|
|
|
|
|
|
ItemSelectUser,
|
|
|
|
|
|
|
|
ItemSelectProject,
|
|
|
|
|
|
|
|
ItemSelectWorkOrder,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
dicts: ["unit", "check_status", "check_result"],
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
// 遮罩层
|
|
|
|
// 遮罩层
|
|
|
@ -435,7 +645,7 @@ export default {
|
|
|
|
total: 0,
|
|
|
|
total: 0,
|
|
|
|
// 生产过程检验任务表格数据
|
|
|
|
// 生产过程检验任务表格数据
|
|
|
|
qcProduceList: [],
|
|
|
|
qcProduceList: [],
|
|
|
|
checkTypeList:[],
|
|
|
|
checkTypeList: [],
|
|
|
|
defectTypeList: [],
|
|
|
|
defectTypeList: [],
|
|
|
|
// 弹出层标题
|
|
|
|
// 弹出层标题
|
|
|
|
title: "",
|
|
|
|
title: "",
|
|
|
@ -473,41 +683,37 @@ export default {
|
|
|
|
// 表单参数
|
|
|
|
// 表单参数
|
|
|
|
form: {},
|
|
|
|
form: {},
|
|
|
|
|
|
|
|
|
|
|
|
checkTypes:[],
|
|
|
|
checkTypes: [],
|
|
|
|
batchList:[],
|
|
|
|
batchList: [],
|
|
|
|
// 表单校验
|
|
|
|
// 表单校验
|
|
|
|
rules: {
|
|
|
|
rules: {
|
|
|
|
incomeBatchNo: [
|
|
|
|
incomeBatchNo: [
|
|
|
|
{ required: true, message: "批次号不能为空", trigger: "blur" }
|
|
|
|
{ required: true, message: "批次号不能为空", trigger: "blur" },
|
|
|
|
],
|
|
|
|
],
|
|
|
|
orderNo: [
|
|
|
|
orderNo: [
|
|
|
|
{ required: true, message: "订单号不能为空", trigger: "blur" }
|
|
|
|
{ required: true, message: "订单号不能为空", trigger: "blur" },
|
|
|
|
],
|
|
|
|
],
|
|
|
|
materialName: [
|
|
|
|
materialName: [
|
|
|
|
{ required: true, message: "物料号不能为空", trigger: "blur" }
|
|
|
|
{ required: true, message: "物料号不能为空", trigger: "blur" },
|
|
|
|
],
|
|
|
|
|
|
|
|
quality: [
|
|
|
|
|
|
|
|
{ required: true, message: "数量不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
unit: [
|
|
|
|
|
|
|
|
{ required: true, message: "单位不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
quality: [{ required: true, message: "数量不能为空", trigger: "blur" }],
|
|
|
|
|
|
|
|
unit: [{ required: true, message: "单位不能为空", trigger: "blur" }],
|
|
|
|
supplierName: [
|
|
|
|
supplierName: [
|
|
|
|
{ required: true, message: "车间不能为空", trigger: "blur" }
|
|
|
|
{ required: true, message: "车间不能为空", trigger: "blur" },
|
|
|
|
],
|
|
|
|
],
|
|
|
|
incomeTime: [
|
|
|
|
incomeTime: [
|
|
|
|
{ required: true, message: "生产时间不能为空", trigger: "blur" }
|
|
|
|
{ required: true, message: "生产时间不能为空", trigger: "blur" },
|
|
|
|
],
|
|
|
|
],
|
|
|
|
checkManName: [
|
|
|
|
checkManName: [
|
|
|
|
{ required: true, message: "检测人不能为空", trigger: "blur" }
|
|
|
|
{ required: true, message: "检测人不能为空", trigger: "blur" },
|
|
|
|
],
|
|
|
|
],
|
|
|
|
checkLoc: [
|
|
|
|
checkLoc: [
|
|
|
|
{ required: true, message: "检测地点不能为空", trigger: "blur" }
|
|
|
|
{ required: true, message: "检测地点不能为空", trigger: "blur" },
|
|
|
|
],
|
|
|
|
],
|
|
|
|
checkType: [
|
|
|
|
checkType: [
|
|
|
|
{ required: true, message: "检测类型不能为空", trigger: "blur" }
|
|
|
|
{ required: true, message: "检测类型不能为空", trigger: "blur" },
|
|
|
|
]
|
|
|
|
],
|
|
|
|
}
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
@ -520,41 +726,49 @@ export default {
|
|
|
|
/****/
|
|
|
|
/****/
|
|
|
|
//获取检验节点
|
|
|
|
//获取检验节点
|
|
|
|
getCheckTypes() {
|
|
|
|
getCheckTypes() {
|
|
|
|
getCheckTypes('produce').then(response => {
|
|
|
|
getCheckTypes("produce").then((response) => {
|
|
|
|
this.checkTypes = response;
|
|
|
|
this.checkTypes = response;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/**获取默认查询时间段**/
|
|
|
|
/**获取默认查询时间段**/
|
|
|
|
getDate() {
|
|
|
|
getDate() {
|
|
|
|
let start = this.Fungetdate (0)
|
|
|
|
let start = this.Fungetdate(0);
|
|
|
|
let end = this.Fungetdate (1)
|
|
|
|
let end = this.Fungetdate(1);
|
|
|
|
this.queryParams.incomeTimeArray.push(start,end)
|
|
|
|
this.queryParams.incomeTimeArray.push(start, end);
|
|
|
|
//this.queryParams.checkTimeArray.push(start,end)
|
|
|
|
//this.queryParams.checkTimeArray.push(start,end)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
Fungetdate (num) {
|
|
|
|
Fungetdate(num) {
|
|
|
|
var dd = new Date();
|
|
|
|
var dd = new Date();
|
|
|
|
dd.setDate(dd.getDate() + num);
|
|
|
|
dd.setDate(dd.getDate() + num);
|
|
|
|
var y = dd.getFullYear();
|
|
|
|
var y = dd.getFullYear();
|
|
|
|
var m = dd.getMonth() + 1;//获取当前月份的日期
|
|
|
|
var m = dd.getMonth() + 1; //获取当前月份的日期
|
|
|
|
var d = dd.getDate();
|
|
|
|
var d = dd.getDate();
|
|
|
|
return y + "-" + m + "-" + d+" 00:00:00";
|
|
|
|
return y + "-" + m + "-" + d + " 00:00:00";
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
/** 查询生产过程检验任务列表 */
|
|
|
|
/** 查询生产过程检验任务列表 */
|
|
|
|
getList() {
|
|
|
|
getList() {
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
|
|
|
|
|
|
|
|
if(this.queryParams.incomeTimeArray.length>0){
|
|
|
|
if (this.queryParams.incomeTimeArray.length > 0) {
|
|
|
|
this.queryParams.incomeTimeStart = moment(this.queryParams.incomeTimeArray[0]).format('YYYY-MM-DD HH:mm:ss');
|
|
|
|
this.queryParams.incomeTimeStart = moment(
|
|
|
|
this.queryParams.incomeTimeEnd = moment(this.queryParams.incomeTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
|
|
|
|
this.queryParams.incomeTimeArray[0]
|
|
|
|
|
|
|
|
).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
|
|
|
this.queryParams.incomeTimeEnd = moment(
|
|
|
|
|
|
|
|
this.queryParams.incomeTimeArray[1]
|
|
|
|
|
|
|
|
).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if(this.queryParams.checkTimeArray.length>0){
|
|
|
|
if (this.queryParams.checkTimeArray.length > 0) {
|
|
|
|
this.queryParams.checkTimeStart = moment(this.queryParams.checkTimeArray[0]).format('YYYY-MM-DD HH:mm:ss');
|
|
|
|
this.queryParams.checkTimeStart = moment(
|
|
|
|
this.queryParams.checkTimeEnd = moment(this.queryParams.checkTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
|
|
|
|
this.queryParams.checkTimeArray[0]
|
|
|
|
|
|
|
|
).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
|
|
|
this.queryParams.checkTimeEnd = moment(
|
|
|
|
|
|
|
|
this.queryParams.checkTimeArray[1]
|
|
|
|
|
|
|
|
).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
listQcProduce(this.queryParams).then(response => {
|
|
|
|
listQcProduce(this.queryParams).then((response) => {
|
|
|
|
this.qcProduceList = response.rows;
|
|
|
|
this.qcProduceList = response.rows;
|
|
|
|
this.total = response.total;
|
|
|
|
this.total = response.total;
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
@ -596,7 +810,7 @@ export default {
|
|
|
|
updateTime: null,
|
|
|
|
updateTime: null,
|
|
|
|
factoryCode: null,
|
|
|
|
factoryCode: null,
|
|
|
|
delFlag: null,
|
|
|
|
delFlag: null,
|
|
|
|
defects: []
|
|
|
|
defects: [],
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.resetForm("form");
|
|
|
|
this.resetForm("form");
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -612,9 +826,9 @@ export default {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 多选框选中数据
|
|
|
|
// 多选框选中数据
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
handleSelectionChange(selection) {
|
|
|
|
this.ids = selection.map(item => item.recordId)
|
|
|
|
this.ids = selection.map((item) => item.recordId);
|
|
|
|
this.single = selection.length!==1
|
|
|
|
this.single = selection.length !== 1;
|
|
|
|
this.multiple = !selection.length
|
|
|
|
this.multiple = !selection.length;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
handleAdd() {
|
|
|
|
handleAdd() {
|
|
|
@ -622,13 +836,12 @@ export default {
|
|
|
|
this.form.defects = this.defectTypeList;
|
|
|
|
this.form.defects = this.defectTypeList;
|
|
|
|
this.open = true;
|
|
|
|
this.open = true;
|
|
|
|
this.title = "添加生产过程检验任务";
|
|
|
|
this.title = "添加生产过程检验任务";
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
handleUpdate(row) {
|
|
|
|
handleUpdate(row) {
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
const recordId = row.recordId || this.ids
|
|
|
|
const recordId = row.recordId || this.ids;
|
|
|
|
getQcProduce(recordId).then(response => {
|
|
|
|
getQcProduce(recordId).then((response) => {
|
|
|
|
this.form = response.data;
|
|
|
|
this.form = response.data;
|
|
|
|
if (this.form.defects == null) {
|
|
|
|
if (this.form.defects == null) {
|
|
|
|
this.form.defects = this.defectTypeList;
|
|
|
|
this.form.defects = this.defectTypeList;
|
|
|
@ -636,23 +849,23 @@ export default {
|
|
|
|
this.open = true;
|
|
|
|
this.open = true;
|
|
|
|
this.title = "修改生产过程检验任务";
|
|
|
|
this.title = "修改生产过程检验任务";
|
|
|
|
|
|
|
|
|
|
|
|
getBatchList(response.data.orderNo).then(response => {
|
|
|
|
getBatchList(response.data.orderNo).then((response) => {
|
|
|
|
this.batchList = response;
|
|
|
|
this.batchList = response;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 提交按钮 */
|
|
|
|
/** 提交按钮 */
|
|
|
|
submitForm() {
|
|
|
|
submitForm() {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if (this.form.recordId != null) {
|
|
|
|
if (this.form.recordId != null) {
|
|
|
|
updateQcProduce(this.form).then(response => {
|
|
|
|
updateQcProduce(this.form).then((response) => {
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
addQcProduce(this.form).then(response => {
|
|
|
|
addQcProduce(this.form).then((response) => {
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -663,27 +876,41 @@ export default {
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
/** 删除按钮操作 */
|
|
|
|
handleDelete(row) {
|
|
|
|
handleDelete(row) {
|
|
|
|
const recordIds = row.recordId || this.ids;
|
|
|
|
const recordIds = row.recordId || this.ids;
|
|
|
|
this.$modal.confirm('是否确认删除生产过程检验任务编号为"' + recordIds + '"的数据项?').then(function() {
|
|
|
|
this.$modal
|
|
|
|
|
|
|
|
.confirm(
|
|
|
|
|
|
|
|
'是否确认删除生产过程检验任务编号为"' + recordIds + '"的数据项?'
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
.then(function () {
|
|
|
|
return delQcProduce(recordIds);
|
|
|
|
return delQcProduce(recordIds);
|
|
|
|
}).then(() => {
|
|
|
|
})
|
|
|
|
|
|
|
|
.then(() => {
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
}).catch(() => {});
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(() => {});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
handleExport() {
|
|
|
|
handleExport() {
|
|
|
|
this.download('quality/qcProduce/export', {
|
|
|
|
this.download(
|
|
|
|
...this.queryParams
|
|
|
|
"quality/qcProduce/export",
|
|
|
|
}, `qcProduce_${new Date().getTime()}.xlsx`)
|
|
|
|
{
|
|
|
|
|
|
|
|
...this.queryParams,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
`qcProduce_${new Date().getTime()}.xlsx`
|
|
|
|
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 数据状态修改
|
|
|
|
// 数据状态修改
|
|
|
|
handleStatusChange(row) {
|
|
|
|
handleStatusChange(row) {
|
|
|
|
let text = row.status === "0" ? "停用" : "启用";
|
|
|
|
let text = row.status === "0" ? "停用" : "启用";
|
|
|
|
this.$modal.confirm('确认要"' + text + '""' + row.checkNo + '"吗?').then(function() {
|
|
|
|
this.$modal
|
|
|
|
|
|
|
|
.confirm('确认要"' + text + '""' + row.checkNo + '"吗?')
|
|
|
|
|
|
|
|
.then(function () {
|
|
|
|
return changeProduceStatus(row.recordId, row.status);
|
|
|
|
return changeProduceStatus(row.recordId, row.status);
|
|
|
|
}).then(() => {
|
|
|
|
})
|
|
|
|
|
|
|
|
.then(() => {
|
|
|
|
this.$modal.msgSuccess(text + "成功");
|
|
|
|
this.$modal.msgSuccess(text + "成功");
|
|
|
|
}).catch(function() {
|
|
|
|
})
|
|
|
|
|
|
|
|
.catch(function () {
|
|
|
|
row.status = row.status === "0" ? "1" : "0";
|
|
|
|
row.status = row.status === "0" ? "1" : "0";
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -700,7 +927,7 @@ export default {
|
|
|
|
this.form.quality = obj.quality;
|
|
|
|
this.form.quality = obj.quality;
|
|
|
|
this.form.unit = obj.unit;
|
|
|
|
this.form.unit = obj.unit;
|
|
|
|
this.form.incomeTime = obj.incomeTime;
|
|
|
|
this.form.incomeTime = obj.incomeTime;
|
|
|
|
getBatchList(obj.workorderCode).then(response => {
|
|
|
|
getBatchList(obj.workorderCode).then((response) => {
|
|
|
|
this.batchList = response;
|
|
|
|
this.batchList = response;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -725,26 +952,30 @@ export default {
|
|
|
|
this.form.checkManName = obj.name;
|
|
|
|
this.form.checkManName = obj.name;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//检验项目弹窗
|
|
|
|
//检验项目弹窗
|
|
|
|
handleCheckProject(row){
|
|
|
|
handleCheckProject(row) {
|
|
|
|
|
|
|
|
if (row.checkStatus != "0") {
|
|
|
|
if(row.checkStatus != '0'){
|
|
|
|
|
|
|
|
this.$modal.msgSuccess("已经完成检验");
|
|
|
|
this.$modal.msgSuccess("已经完成检验");
|
|
|
|
return
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.$refs.itemSelectProject.showFlag = true;
|
|
|
|
this.$refs.itemSelectProject.showFlag = true;
|
|
|
|
this.$refs.itemSelectProject.init(row,'produce');
|
|
|
|
this.$refs.itemSelectProject.init(row, "produce");
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
//查看检验项目弹窗
|
|
|
|
|
|
|
|
handleView(row) {
|
|
|
|
|
|
|
|
this.$refs.itemSelectProject.showFlag = true;
|
|
|
|
|
|
|
|
this.$refs.itemSelectProject.init(row, "produce");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//提交检测结果
|
|
|
|
//提交检测结果
|
|
|
|
saveCheck(){
|
|
|
|
saveCheck() {
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
handleDefectType() {
|
|
|
|
handleDefectType() {
|
|
|
|
const defectType = "produce"
|
|
|
|
const defectType = "produce";
|
|
|
|
getDefectTypeListByDefectType(defectType).then(response => {
|
|
|
|
getDefectTypeListByDefectType(defectType).then((response) => {
|
|
|
|
this.defectTypeList = response.rows;
|
|
|
|
this.defectTypeList = response.rows;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|