|
|
@@ -16,6 +16,7 @@
|
|
|
ref="ruleFormRef"
|
|
|
label-width="150px"
|
|
|
v-loading="loading"
|
|
|
+ :disabled="type === 'detail'"
|
|
|
>
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
@@ -234,153 +235,152 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- </el-form>
|
|
|
|
|
|
- <material
|
|
|
- v-if="
|
|
|
- addForm.produceTaskId &&
|
|
|
- addForm.reportWorkType == 2 &&
|
|
|
- workOrderInfo &&
|
|
|
- productionInfo
|
|
|
- "
|
|
|
- ref="materialRef"
|
|
|
- :pickDetails.sync="addForm.pickDetails"
|
|
|
- :outputDetails.sync="addForm.outputDetails"
|
|
|
- :preOutputDetails="preOutputDetails"
|
|
|
- :sumOutputDetails="sumOutputDetails"
|
|
|
- :workOrderId="addForm.workOrderId"
|
|
|
- :ruleId="addForm.ruleId"
|
|
|
- :produceTaskId="addForm.produceTaskId"
|
|
|
- :produceTaskName="addForm.produceTaskName"
|
|
|
- :produceTaskInstanceId="productionInfo.produceTaskInstanceId"
|
|
|
- :bomCategoryId="workOrderInfo.bomCategoryId"
|
|
|
- :outputType="addForm.outputType"
|
|
|
- :categoryId="workOrderInfo.categoryId"
|
|
|
- :executeStatus="productionInfo.executeStatus"
|
|
|
- @refresh="getListByWorkOrderId"
|
|
|
- ></material>
|
|
|
-
|
|
|
- <header-title title="检查项目" :style="`margin-top: 20px`"></header-title>
|
|
|
-
|
|
|
- <template v-if="addForm.recordRulesClassify == 10">
|
|
|
- <el-tabs v-model="statisticsType" type="card">
|
|
|
- <el-tab-pane
|
|
|
- v-for="i in statisticsTypeList"
|
|
|
- :label="i.label"
|
|
|
- :name="i.value"
|
|
|
- :key="i.value"
|
|
|
- >
|
|
|
- </el-tab-pane>
|
|
|
- </el-tabs>
|
|
|
- <statistics
|
|
|
- ref="statisticsRef"
|
|
|
- :details.sync="addForm.details"
|
|
|
- :statisticsType="statisticsType"
|
|
|
- :produceTaskId="addForm.produceTaskId"
|
|
|
+ <material
|
|
|
+ v-if="
|
|
|
+ addForm.produceTaskId &&
|
|
|
+ addForm.reportWorkType == 2 &&
|
|
|
+ workOrderInfo &&
|
|
|
+ productionInfo
|
|
|
+ "
|
|
|
+ ref="materialRef"
|
|
|
+ :pickDetails.sync="addForm.pickDetails"
|
|
|
+ :outputDetails.sync="addForm.outputDetails"
|
|
|
+ :preOutputDetails="preOutputDetails"
|
|
|
+ :sumOutputDetails="sumOutputDetails"
|
|
|
:workOrderId="addForm.workOrderId"
|
|
|
- :routingId="addForm.produceRoutingId"
|
|
|
:ruleId="addForm.ruleId"
|
|
|
- ></statistics>
|
|
|
- </template>
|
|
|
-
|
|
|
- <ele-pro-table
|
|
|
- v-if="addForm.recordRulesClassify && addForm.recordRulesClassify != 10"
|
|
|
- v-loading="loading"
|
|
|
- ref="table"
|
|
|
- row-key="id"
|
|
|
- :columns="detailsColumns"
|
|
|
- :datasource="addForm.details"
|
|
|
- cacheKey="mes-releaseRulesDialong-2510281408"
|
|
|
- :needPage="false"
|
|
|
- >
|
|
|
- <template v-slot:toolkit>
|
|
|
- <el-button
|
|
|
- v-if="addForm.recordRulesClassify != 4"
|
|
|
- type="primary"
|
|
|
- @click="batchCheck"
|
|
|
- >批量检查</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- v-if="addForm.recordRulesClassify != 4"
|
|
|
- type="primary"
|
|
|
- @click="batchQualified"
|
|
|
- >批量合格</el-button
|
|
|
- >
|
|
|
- </template>
|
|
|
- <template v-slot:paramValue="{ row }">
|
|
|
- <div v-if="addForm.recordRulesClassify == 4">
|
|
|
- {{ row.productName || row.name }}
|
|
|
- </div>
|
|
|
- <div v-else>
|
|
|
- {{ row.paramValue }}
|
|
|
- </div>
|
|
|
+ :produceTaskId="addForm.produceTaskId"
|
|
|
+ :produceTaskName="addForm.produceTaskName"
|
|
|
+ :produceTaskInstanceId="productionInfo.produceTaskInstanceId"
|
|
|
+ :bomCategoryId="workOrderInfo.bomCategoryId"
|
|
|
+ :outputType="addForm.outputType"
|
|
|
+ :categoryId="workOrderInfo.categoryId"
|
|
|
+ :executeStatus="productionInfo.executeStatus"
|
|
|
+ @refresh="getListByWorkOrderId"
|
|
|
+ ></material>
|
|
|
+
|
|
|
+ <header-title title="检查项目" :style="`margin-top: 20px`"></header-title>
|
|
|
+
|
|
|
+ <template v-if="addForm.recordRulesClassify == 10">
|
|
|
+ <el-tabs v-model="statisticsType" type="card">
|
|
|
+ <el-tab-pane
|
|
|
+ v-for="i in statisticsTypeList"
|
|
|
+ :label="i.label"
|
|
|
+ :name="i.value"
|
|
|
+ :key="i.value"
|
|
|
+ >
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ <statistics
|
|
|
+ ref="statisticsRef"
|
|
|
+ :details.sync="addForm.details"
|
|
|
+ :statisticsType="statisticsType"
|
|
|
+ :produceTaskId="addForm.produceTaskId"
|
|
|
+ :workOrderId="addForm.workOrderId"
|
|
|
+ :routingId="addForm.produceRoutingId"
|
|
|
+ :ruleId="addForm.ruleId"
|
|
|
+ ></statistics>
|
|
|
</template>
|
|
|
- <template v-slot:toolNames="{ row }">
|
|
|
- <el-link :underline="false" style="cursor: pointer">
|
|
|
- <div class="ele-cell">
|
|
|
- <div @click="handleAdd(row)">
|
|
|
- {{ row.toolNames ? row.toolNames : '请选择' }}
|
|
|
+
|
|
|
+ <ele-pro-table
|
|
|
+ v-if="addForm.recordRulesClassify && addForm.recordRulesClassify != 10"
|
|
|
+ v-loading="loading"
|
|
|
+ ref="table"
|
|
|
+ row-key="id"
|
|
|
+ :columns="detailsColumns"
|
|
|
+ :datasource="addForm.details"
|
|
|
+ cacheKey="mes-releaseRulesDialong-2510281408"
|
|
|
+ :needPage="false"
|
|
|
+ >
|
|
|
+ <template v-slot:toolkit>
|
|
|
+ <el-button
|
|
|
+ v-if="addForm.recordRulesClassify != 4"
|
|
|
+ type="primary"
|
|
|
+ @click="batchCheck"
|
|
|
+ >批量检查</el-button
|
|
|
+ >
|
|
|
+ <el-button
|
|
|
+ v-if="addForm.recordRulesClassify != 4"
|
|
|
+ type="primary"
|
|
|
+ @click="batchQualified"
|
|
|
+ >批量合格</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ <template v-slot:paramValue="{ row }">
|
|
|
+ <div v-if="addForm.recordRulesClassify == 4">
|
|
|
+ {{ row.productName || row.name }}
|
|
|
+ </div>
|
|
|
+ <div v-else>
|
|
|
+ {{ row.paramValue }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-slot:toolNames="{ row }">
|
|
|
+ <el-link :underline="false" style="cursor: pointer">
|
|
|
+ <div class="ele-cell">
|
|
|
+ <div @click="handleAdd(row)">
|
|
|
+ {{ row.toolNames ? row.toolNames : '请选择' }}
|
|
|
+ </div>
|
|
|
+ <i
|
|
|
+ v-if="!row.toolNames"
|
|
|
+ class="el-icon-arrow-down"
|
|
|
+ @click="handleAdd(row)"
|
|
|
+ ></i>
|
|
|
+ <i v-else class="el-icon-close" @click="clearTool(row)"></i>
|
|
|
</div>
|
|
|
- <i
|
|
|
- v-if="!row.toolNames"
|
|
|
- class="el-icon-arrow-down"
|
|
|
- @click="handleAdd(row)"
|
|
|
- ></i>
|
|
|
- <i v-else class="el-icon-close" @click="clearTool(row)"></i>
|
|
|
+ </el-link>
|
|
|
+ </template>
|
|
|
+ <template v-slot:checkUsersIds="{ row }">
|
|
|
+ <div>
|
|
|
+ <el-select
|
|
|
+ v-model="row.checkUsersIds"
|
|
|
+ placeholder="请选择检查人"
|
|
|
+ filterable
|
|
|
+ multiple
|
|
|
+ @change="checkUsersIdsChange(row)"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in activeTeamUserList"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ :key="item.id"
|
|
|
+ >
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
</div>
|
|
|
- </el-link>
|
|
|
- </template>
|
|
|
- <template v-slot:checkUsersIds="{ row }">
|
|
|
- <div>
|
|
|
- <el-select
|
|
|
- v-model="row.checkUsersIds"
|
|
|
- placeholder="请选择检查人"
|
|
|
- filterable
|
|
|
- multiple
|
|
|
- @change="checkUsersIdsChange(row)"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in activeTeamUserList"
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- :key="item.id"
|
|
|
+ </template>
|
|
|
+ <template v-slot:checkStatus="{ row }">
|
|
|
+ <div>
|
|
|
+ <el-radio-group v-model="row.checkStatus">
|
|
|
+ <el-radio :label="1">已检查</el-radio>
|
|
|
+ <el-radio :label="0">未检查</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-slot:errorMsg="{ row }">
|
|
|
+ <div>
|
|
|
+ <el-input
|
|
|
+ type="text"
|
|
|
+ :rows="1"
|
|
|
+ placeholder="请输入"
|
|
|
+ v-model="row.errorMsg"
|
|
|
>
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template v-slot:checkStatus="{ row }">
|
|
|
- <div>
|
|
|
- <el-radio-group v-model="row.checkStatus">
|
|
|
- <el-radio :label="1">已检查</el-radio>
|
|
|
- <el-radio :label="0">未检查</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <template v-slot:errorMsg="{ row }">
|
|
|
- <div>
|
|
|
- <el-input
|
|
|
- type="text"
|
|
|
- :rows="1"
|
|
|
- placeholder="请输入"
|
|
|
- v-model="row.errorMsg"
|
|
|
- >
|
|
|
- <template v-if="row.unitName" slot="append">
|
|
|
- <div>{{ row.unitName }}</div>
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
- </div></template
|
|
|
- >
|
|
|
- <template v-slot:checkResult="{ row }">
|
|
|
- <div>
|
|
|
- <el-radio-group v-model="row.checkResult">
|
|
|
- <el-radio :label="1">合格</el-radio>
|
|
|
- <el-radio :label="0">不合格</el-radio>
|
|
|
- </el-radio-group>
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </ele-pro-table>
|
|
|
-
|
|
|
+ <template v-if="row.unitName" slot="append">
|
|
|
+ <div>{{ row.unitName }}</div>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </div></template
|
|
|
+ >
|
|
|
+ <template v-slot:checkResult="{ row }">
|
|
|
+ <div>
|
|
|
+ <el-radio-group v-model="row.checkResult">
|
|
|
+ <el-radio :label="1">合格</el-radio>
|
|
|
+ <el-radio :label="0">不合格</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </ele-pro-table>
|
|
|
+ </el-form>
|
|
|
<!-- 底部按钮 -->
|
|
|
<template #footer>
|
|
|
<div class="modal-footer">
|
|
|
@@ -388,7 +388,8 @@
|
|
|
v-if="
|
|
|
$hasPermission('mes:producetaskrecordrulesrecord:res') &&
|
|
|
productionInfo &&
|
|
|
- productionInfo.executeStatus == 2
|
|
|
+ productionInfo.executeStatus == 2 &&
|
|
|
+ type !== 'detail'
|
|
|
"
|
|
|
:loading="butLoading"
|
|
|
type="primary"
|
|
|
@@ -398,7 +399,10 @@
|
|
|
</el-button>
|
|
|
|
|
|
<el-button
|
|
|
- v-if="$hasPermission('mes:producetaskrecordrulesrecord:sus')"
|
|
|
+ v-if="
|
|
|
+ $hasPermission('mes:producetaskrecordrulesrecord:sus') &&
|
|
|
+ type !== 'detail'
|
|
|
+ "
|
|
|
:loading="butLoading"
|
|
|
type="primary"
|
|
|
@click="submit('submit')"
|
|
|
@@ -414,7 +418,8 @@
|
|
|
v-if="
|
|
|
productionInfo &&
|
|
|
productionInfo.recordId != null &&
|
|
|
- productionInfo.executeStatus == 1
|
|
|
+ productionInfo.executeStatus == 1 &&
|
|
|
+ type !== 'detail'
|
|
|
"
|
|
|
title="您确定要清空缓存吗?"
|
|
|
@confirm="clearCache"
|
|
|
@@ -426,7 +431,10 @@
|
|
|
</template>
|
|
|
|
|
|
<el-button
|
|
|
- v-if="$hasPermission('mes:producetaskrecordrulesrecord:saveorupdate')"
|
|
|
+ v-if="
|
|
|
+ $hasPermission('mes:producetaskrecordrulesrecord:saveorupdate') &&
|
|
|
+ type !== 'detail'
|
|
|
+ "
|
|
|
:loading="butLoading"
|
|
|
type="primary"
|
|
|
@click="submit('cache')"
|
|
|
@@ -435,10 +443,7 @@
|
|
|
缓存
|
|
|
</el-button>
|
|
|
|
|
|
- <el-button
|
|
|
- v-if="productionInfo && productionInfo.executeStatus == 2"
|
|
|
- @click="handleBeforeClose"
|
|
|
- >
|
|
|
+ <el-button v-if="productionInfo" @click="handleBeforeClose">
|
|
|
关闭
|
|
|
</el-button>
|
|
|
</div>
|
|
|
@@ -664,7 +669,9 @@
|
|
|
{ label: '成品统计', value: '1' },
|
|
|
{ label: '物料统计', value: '2' },
|
|
|
{ label: '工序统计', value: '3' }
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ // 查看 编辑 edit 、detail
|
|
|
+ type: 'edit'
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -755,6 +762,11 @@
|
|
|
this.getWorkshopArea();
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 仅仅查看
|
|
|
+ openView(productionInfo, workOrderInfo) {
|
|
|
+ this.type = 'detail';
|
|
|
+ this.open(productionInfo, workOrderInfo);
|
|
|
+ },
|
|
|
open(productionInfo, workOrderInfo) {
|
|
|
console.log(
|
|
|
'productionInfo, workOrderInfo',
|
|
|
@@ -1031,7 +1043,8 @@
|
|
|
this.workOrderInfo = null;
|
|
|
this.productionInfo = null;
|
|
|
this.statisticsType = '1';
|
|
|
- console.log('this.$refs.ruleFormRef', this.addForm);
|
|
|
+ // 重置
|
|
|
+ this.type = 'edit';
|
|
|
this.$nextTick(() => {
|
|
|
this.$refs.ruleFormRef.clearValidate();
|
|
|
this.visible = false;
|