|
@@ -1,89 +1,42 @@
|
|
<template>
|
|
<template>
|
|
<!-- 添加或修改项目信息对话框 -->
|
|
<!-- 添加或修改项目信息对话框 -->
|
|
- <el-drawer
|
|
|
|
- v-model="visible"
|
|
|
|
- size="80%"
|
|
|
|
- direction="rtl"
|
|
|
|
- :close-on-press-escape="false"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-drawer v-model="visible" size="80%" direction="rtl" :close-on-press-escape="false">
|
|
<div class="page-container form-container">
|
|
<div class="page-container form-container">
|
|
<div class="form-btns-container">
|
|
<div class="form-btns-container">
|
|
- <span class="title-label"
|
|
|
|
- ><el-icon>
|
|
|
|
|
|
+ <span class="title-label"><el-icon>
|
|
<Document />
|
|
<Document />
|
|
</el-icon>
|
|
</el-icon>
|
|
- 报工详情</span
|
|
|
|
- >
|
|
|
|
- <el-button
|
|
|
|
- v-if="editStatus"
|
|
|
|
- type="primary"
|
|
|
|
- icon="Check"
|
|
|
|
- style="margin-right: 10px"
|
|
|
|
- :disabled="form.status > 3 || !currentDept"
|
|
|
|
- @click="handleSave"
|
|
|
|
- >保 存
|
|
|
|
|
|
+ 报工详情</span>
|
|
|
|
+ <el-button v-if="editStatus" type="primary" icon="Check" style="margin-right: 10px"
|
|
|
|
+ :disabled="form.status > 3 || !currentDept" @click="handleSave">保 存
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button v-if="editStatus" icon="Close" @click="handleCancel"
|
|
|
|
- >取 消
|
|
|
|
|
|
+ <el-button v-if="editStatus" icon="Close" @click="handleCancel">取 消
|
|
</el-button>
|
|
</el-button>
|
|
- <el-button v-else type="primary" icon="Check" @click="handleCancel"
|
|
|
|
- >确定
|
|
|
|
|
|
+ <el-button v-else type="primary" icon="Check" @click="handleCancel">确定
|
|
</el-button>
|
|
</el-button>
|
|
</div>
|
|
</div>
|
|
<!-- 主表 -->
|
|
<!-- 主表 -->
|
|
- <el-form
|
|
|
|
- ref="dayworkItemRef"
|
|
|
|
- class="master-container"
|
|
|
|
- :model="form"
|
|
|
|
- :rules="rules"
|
|
|
|
- :show-message="true"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-form ref="dayworkItemRef" class="master-container" :model="form" :rules="rules" :show-message="true">
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
<el-col :span="7">
|
|
<el-col :span="7">
|
|
<el-form-item label="开始时间:" prop="startTime">
|
|
<el-form-item label="开始时间:" prop="startTime">
|
|
- <el-date-picker
|
|
|
|
- v-model="form.startTime"
|
|
|
|
- :disabled="!editStatus || !currentDept"
|
|
|
|
- type="datetime"
|
|
|
|
- value-format="YYYY-MM-DD HH:mm:ss "
|
|
|
|
- :clearable="false"
|
|
|
|
- :editable="false"
|
|
|
|
- placeholder="请选择开始时间"
|
|
|
|
- @change="handleTotalTime"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-date-picker v-model="form.startTime" :disabled="!editStatus || !currentDept" type="datetime"
|
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss " :clearable="false" :editable="false" placeholder="请选择开始时间"
|
|
|
|
+ @change="handleTotalTime" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="9">
|
|
<el-col :span="9">
|
|
- <el-form-item
|
|
|
|
- label="工序名称:"
|
|
|
|
- prop="processId"
|
|
|
|
- label-width="90px"
|
|
|
|
- >
|
|
|
|
- <el-select-v2
|
|
|
|
- v-model="form.processId"
|
|
|
|
- clearable
|
|
|
|
- :disabled="true"
|
|
|
|
- :options="processList"
|
|
|
|
- placeholder="请选择工序"
|
|
|
|
- style="width: 220px"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-form-item label="工序名称:" prop="processId" label-width="90px">
|
|
|
|
+ <el-select-v2 v-model="form.processId" clearable :disabled="true" :options="processList"
|
|
|
|
+ placeholder="请选择工序" style="width: 220px" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="生产状态:" prop="status" align="center">
|
|
<el-form-item label="生产状态:" prop="status" align="center">
|
|
- <el-select
|
|
|
|
- v-model="form.status"
|
|
|
|
- placeholder="请选择生产状态"
|
|
|
|
- :disabled="!editStatus || !currentDept"
|
|
|
|
- style="width: 220px"
|
|
|
|
- @change="handleChangeStatus"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="dict in dynamicOptions"
|
|
|
|
- :key="dict.value"
|
|
|
|
- :label="dict.label"
|
|
|
|
- :value="dict.value"
|
|
|
|
- ></el-option>
|
|
|
|
|
|
+ <el-select v-model="form.status" placeholder="请选择生产状态" :disabled="!editStatus || !currentDept"
|
|
|
|
+ style="width: 220px" @change="handleChangeStatus">
|
|
|
|
+ <el-option v-for="dict in dynamicOptions" :key="dict.value" :label="dict.label"
|
|
|
|
+ :value="dict.value"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -91,84 +44,40 @@
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
<el-col :span="7">
|
|
<el-col :span="7">
|
|
<el-form-item label="结束时间:" prop="endTime">
|
|
<el-form-item label="结束时间:" prop="endTime">
|
|
- <el-date-picker
|
|
|
|
- v-model="form.endTime"
|
|
|
|
- :disabled="!editStatus || !currentDept"
|
|
|
|
- type="datetime"
|
|
|
|
- value-format="YYYY-MM-DD HH:mm:ss "
|
|
|
|
- :editable="false"
|
|
|
|
- :clearable="false"
|
|
|
|
- placeholder="请选择结束时间"
|
|
|
|
- @change="handleTotalTime"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-date-picker v-model="form.endTime" :disabled="!editStatus || !currentDept" type="datetime"
|
|
|
|
+ value-format="YYYY-MM-DD HH:mm:ss " :editable="false" :clearable="false" placeholder="请选择结束时间"
|
|
|
|
+ @change="handleTotalTime" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="9">
|
|
<el-col :span="9">
|
|
<el-form-item label="操作者:" prop="nickName" label-width="82px">
|
|
<el-form-item label="操作者:" prop="nickName" label-width="82px">
|
|
- <el-input
|
|
|
|
- v-model.trim="form.nickName"
|
|
|
|
- placeholder="请输入操作者"
|
|
|
|
- :disabled="true"
|
|
|
|
- :clearable="true"
|
|
|
|
- style="width: 220px; margin-left: 8px"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-input v-model.trim="form.nickName" placeholder="请输入操作者" :disabled="true" :clearable="true"
|
|
|
|
+ style="width: 220px; margin-left: 8px" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
<el-form-item label="投产量:" prop="prodNum" label-width="82px">
|
|
<el-form-item label="投产量:" prop="prodNum" label-width="82px">
|
|
- <el-input-number
|
|
|
|
- v-model.trim="form.prodNum"
|
|
|
|
- :precision="0"
|
|
|
|
- :disabled="true"
|
|
|
|
- controls-position="right"
|
|
|
|
- style="width: 220px"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-input-number v-model.trim="form.prodNum" :precision="0" :disabled="true" controls-position="right"
|
|
|
|
+ style="width: 220px" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
<el-col :span="7">
|
|
<el-col :span="7">
|
|
- <el-form-item
|
|
|
|
- label="总工时:"
|
|
|
|
- prop="workingHoursTime"
|
|
|
|
- label-width="82px"
|
|
|
|
- >
|
|
|
|
- <el-input
|
|
|
|
- v-model.trim="workingHoursTime"
|
|
|
|
- :disabled="true"
|
|
|
|
- style="width: 220px; margin-left: 0px"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-form-item label="总工时:" prop="workingHoursTime" label-width="82px">
|
|
|
|
+ <el-input v-model.trim="workingHoursTime" :disabled="true" style="width: 220px; margin-left: 0px" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="9">
|
|
<el-col :span="9">
|
|
- <el-form-item
|
|
|
|
- label="合格数:"
|
|
|
|
- prop="qualifiedNum"
|
|
|
|
- label-width="90px"
|
|
|
|
- style="padding-right: 0px"
|
|
|
|
- >
|
|
|
|
- <el-input-number
|
|
|
|
- v-model.trim="form.qualifiedNum"
|
|
|
|
- :disabled="!editStatus || !currentDept"
|
|
|
|
- :precision="0"
|
|
|
|
- controls-position="right"
|
|
|
|
- style="width: 220px"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-form-item label="合格数:" prop="qualifiedNum" label-width="90px" style="padding-right: 0px">
|
|
|
|
+ <el-input-number v-model.trim="form.qualifiedNum" :disabled="!editStatus || !currentDept" :precision="0"
|
|
|
|
+ controls-position="right" style="width: 220px" />
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
- <el-form-item
|
|
|
|
- label="设备:"
|
|
|
|
- prop="equipmentDetailId"
|
|
|
|
- label-width="82px"
|
|
|
|
- >
|
|
|
|
- <el-select-v2
|
|
|
|
- v-model="form.equipmentDetailId"
|
|
|
|
- :disabled="!editStatus || !currentDept"
|
|
|
|
- :options="equipmentList"
|
|
|
|
- placeholder="请选择设备"
|
|
|
|
- style="width: 220px"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-form-item label="设备:" prop="equipmentDetailId" label-width="82px">
|
|
|
|
+ <el-select-v2 v-model="form.equipmentDetailId" :disabled="!editStatus || !currentDept"
|
|
|
|
+ :options="equipmentList" placeholder="请选择设备" style="width: 220px">
|
|
</el-select-v2>
|
|
</el-select-v2>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -178,114 +87,54 @@
|
|
<el-form class="list-search-container" :inline="true">
|
|
<el-form class="list-search-container" :inline="true">
|
|
<el-form-item class="section-title" label="废品信息" />
|
|
<el-form-item class="section-title" label="废品信息" />
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
- icon="Plus"
|
|
|
|
- v-if="editStatus && currentDept"
|
|
|
|
- @click="handleAddReject"
|
|
|
|
- >新增
|
|
|
|
|
|
+ <el-button type="primary" icon="Plus" v-if="editStatus && currentDept" @click="handleAddReject">新增
|
|
</el-button>
|
|
</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<!-- 列表区 -->
|
|
<!-- 列表区 -->
|
|
<div class="el-table-container">
|
|
<div class="el-table-container">
|
|
- <el-table
|
|
|
|
- ref="dayworkItemRejectTable"
|
|
|
|
- v-loading="loading"
|
|
|
|
- row-key="id"
|
|
|
|
- :data="form.groupRejectList"
|
|
|
|
- height="100%"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table ref="dayworkItemRejectTable" v-loading="loading" row-key="id" :data="form.groupRejectList"
|
|
|
|
+ height="100%">
|
|
<el-table-column type="index" label="行号" width="60" align="center">
|
|
<el-table-column type="index" label="行号" width="60" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
{{ scope.$index + 1 }}
|
|
{{ scope.$index + 1 }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="type"
|
|
|
|
- label="分选检查类型"
|
|
|
|
- align="center"
|
|
|
|
- width="150px"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column prop="type" label="分选检查类型" align="center" width="150px">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-select
|
|
|
|
- v-model="scope.row.type"
|
|
|
|
- :disabled="!editStatus || !currentDept"
|
|
|
|
- placeholder="请选择分选检查类型"
|
|
|
|
- @change="(arg) => handleChangeType(scope.row, arg)"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="cause in sort_standard_type"
|
|
|
|
- :key="cause.value"
|
|
|
|
- :label="cause.label"
|
|
|
|
- :value="cause.value"
|
|
|
|
- ></el-option>
|
|
|
|
|
|
+ <el-select v-model="scope.row.type" :disabled="!editStatus || !currentDept" placeholder="请选择分选检查类型"
|
|
|
|
+ @change="(arg) => handleChangeType(scope.row, arg)">
|
|
|
|
+ <el-option v-for="cause in sort_standard_type" :key="cause.value" :label="cause.label"
|
|
|
|
+ :value="cause.value"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="sortStandard"
|
|
|
|
- label="分选检查标准"
|
|
|
|
- align="center"
|
|
|
|
- width="300px"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column prop="sortStandard" label="分选检查标准" align="center" width="300px">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-select
|
|
|
|
- v-model="scope.row.sortStandard"
|
|
|
|
- :disabled="!editStatus || !currentDept"
|
|
|
|
- placeholder="请选择分选检查标准"
|
|
|
|
- >
|
|
|
|
- <el-option
|
|
|
|
- v-for="cause in scope.row.standardList"
|
|
|
|
- :key="cause.value"
|
|
|
|
- :label="cause.label"
|
|
|
|
- :value="cause.value"
|
|
|
|
- ></el-option>
|
|
|
|
|
|
+ <el-select v-model="scope.row.sortStandard" :disabled="!editStatus || !currentDept"
|
|
|
|
+ placeholder="请选择分选检查标准">
|
|
|
|
+ <el-option v-for="cause in scope.row.standardList" :key="cause.value" :label="cause.label"
|
|
|
|
+ :value="cause.value"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- prop="reason"
|
|
|
|
- label="检查结果"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column prop="reason" label="检查结果" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-input
|
|
|
|
- v-model.trim="scope.row.reason"
|
|
|
|
- placeholder="请输入检查结果"
|
|
|
|
- :disabled="!editStatus || !currentDept"
|
|
|
|
- :clearable="true"
|
|
|
|
- style="margin-left: 8px;"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-input v-model.trim="scope.row.reason" placeholder="请输入检查结果" :disabled="!editStatus || !currentDept"
|
|
|
|
+ :clearable="true" style="margin-left: 8px;" />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column
|
|
|
|
- label="废品数量"
|
|
|
|
- width="130px"
|
|
|
|
- prop="rejectNum"
|
|
|
|
- align="center"
|
|
|
|
- >
|
|
|
|
|
|
+ <el-table-column label="废品数量" width="130px" prop="rejectNum" align="center">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-input-number
|
|
|
|
- v-model.trim="scope.row.rejectNum"
|
|
|
|
- placeholder="废品数量"
|
|
|
|
- :disabled="!editStatus || !currentDept"
|
|
|
|
- :precision="0"
|
|
|
|
- :min="0"
|
|
|
|
- controls-position="right"
|
|
|
|
- />
|
|
|
|
|
|
+ <el-input-number v-model.trim="scope.row.rejectNum" placeholder="废品数量"
|
|
|
|
+ :disabled="!editStatus || !currentDept" :precision="0" :min="0" controls-position="right" />
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column fixed="right" label="操作" align="center" width="80px">
|
|
<el-table-column fixed="right" label="操作" align="center" width="80px">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-button
|
|
|
|
- link
|
|
|
|
- type="danger"
|
|
|
|
- icon="Delete"
|
|
|
|
- :disabled="!editStatus || !currentDept"
|
|
|
|
- @click="handleDeleteReject(scope.row)"
|
|
|
|
- >删除
|
|
|
|
|
|
+ <el-button link type="danger" icon="Delete" :disabled="!editStatus || !currentDept"
|
|
|
|
+ @click="handleDeleteReject(scope.row)">删除
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -328,10 +177,10 @@ const maxQuailifiedNum = ref(0);
|
|
const sortProductInspection = ref([])
|
|
const sortProductInspection = ref([])
|
|
const detailsRow = {
|
|
const detailsRow = {
|
|
id: null,
|
|
id: null,
|
|
- type:null,
|
|
|
|
|
|
+ type: null,
|
|
rejectNum: "",
|
|
rejectNum: "",
|
|
checkResult: "",
|
|
checkResult: "",
|
|
- checkStandard:""
|
|
|
|
|
|
+ checkStandard: ""
|
|
};
|
|
};
|
|
// const validateprodNum = (rule, value, callback) => {
|
|
// const validateprodNum = (rule, value, callback) => {
|
|
// if (value <= 0) {
|
|
// if (value <= 0) {
|
|
@@ -444,6 +293,7 @@ const open = (row) => {
|
|
form.value.nickName = row.nickName;
|
|
form.value.nickName = row.nickName;
|
|
form.value.status = row.status;
|
|
form.value.status = row.status;
|
|
form.value.processId = row.processId;
|
|
form.value.processId = row.processId;
|
|
|
|
+ form.vlaue.productId = row.productId
|
|
form.value.productionPlanDetailId = row.productionPlanDetailId;
|
|
form.value.productionPlanDetailId = row.productionPlanDetailId;
|
|
if (form.value.status == 0 || form.value.status == 1) {
|
|
if (form.value.status == 0 || form.value.status == 1) {
|
|
dynamicOptions.value = daywork_status_first.value;
|
|
dynamicOptions.value = daywork_status_first.value;
|
|
@@ -473,12 +323,12 @@ const open = (row) => {
|
|
});
|
|
});
|
|
|
|
|
|
//查询该工序的分选标准
|
|
//查询该工序的分选标准
|
|
- listInspectionInstruction({technologicalProcessDetailId:detailInfo.value.technologicalProcessDetailId}).then(res=>{
|
|
|
|
- if(res.code == 200){
|
|
|
|
- sortProductInspection.value = res.rows;
|
|
|
|
- //查询废品原因
|
|
|
|
- handleQueryReject()
|
|
|
|
- }
|
|
|
|
|
|
+ listInspectionInstruction({ productId: form.value.productId, processId: form.value.processId, technologyVersion: form.value.technologyVersion }).then(res => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ sortProductInspection.value = res.rows;
|
|
|
|
+ //查询废品原因
|
|
|
|
+ handleQueryReject()
|
|
|
|
+ }
|
|
})
|
|
})
|
|
//查询能够选择的设备信息
|
|
//查询能够选择的设备信息
|
|
let productionPlanDetailId = parseInt(row.productionPlanDetailId);
|
|
let productionPlanDetailId = parseInt(row.productionPlanDetailId);
|
|
@@ -574,10 +424,10 @@ const handleSave = () => {
|
|
flag = false;
|
|
flag = false;
|
|
proxy.$modal.msgError(
|
|
proxy.$modal.msgError(
|
|
"第" +
|
|
"第" +
|
|
- (i + 1) +
|
|
|
|
- "行分选检查标准与" +
|
|
|
|
- (reasonList.indexOf(form.value.groupRejectList[i].sortStandard) + 1) +
|
|
|
|
- "行相同"
|
|
|
|
|
|
+ (i + 1) +
|
|
|
|
+ "行分选检查标准与" +
|
|
|
|
+ (reasonList.indexOf(form.value.groupRejectList[i].sortStandard) + 1) +
|
|
|
|
+ "行相同"
|
|
);
|
|
);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -597,23 +447,23 @@ const handleSave = () => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (flag) {
|
|
if (flag) {
|
|
-
|
|
|
|
- if(form.value.groupRejectList.length > 0){
|
|
|
|
- form.value.rejectNum = 0
|
|
|
|
|
|
+
|
|
|
|
+ if (form.value.groupRejectList.length > 0) {
|
|
|
|
+ form.value.rejectNum = 0
|
|
form.value.groupRejectList.forEach(item => {
|
|
form.value.groupRejectList.forEach(item => {
|
|
item.deptId = detailInfo.value.deptId
|
|
item.deptId = detailInfo.value.deptId
|
|
item.inspectionInstructionId = item.sortStandard
|
|
item.inspectionInstructionId = item.sortStandard
|
|
- let checkStandard = item.standardList.filter(info => info.value == item.sortStandard)[0]
|
|
|
|
|
|
+ let checkStandard = item.standardList.filter(info => info.value == item.sortStandard)[0]
|
|
console.log(checkStandard)
|
|
console.log(checkStandard)
|
|
item.checkStandard = checkStandard.label
|
|
item.checkStandard = checkStandard.label
|
|
item.processId = detailInfo.value.processId
|
|
item.processId = detailInfo.value.processId
|
|
- //计算废品总数
|
|
|
|
- form.value.rejectNum += item.rejectNum
|
|
|
|
|
|
+ //计算废品总数
|
|
|
|
+ form.value.rejectNum += item.rejectNum
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- console.log("rejectList",form.value.groupRejectList)
|
|
|
|
|
|
+ console.log("rejectList", form.value.groupRejectList)
|
|
form.value.dayworkId = detailInfo.value.dayworkId;
|
|
form.value.dayworkId = detailInfo.value.dayworkId;
|
|
-
|
|
|
|
|
|
+
|
|
//同工序的所有合格数
|
|
//同工序的所有合格数
|
|
form.value.temporaryProcessQualifiedNum =
|
|
form.value.temporaryProcessQualifiedNum =
|
|
detailInfo.value.totalQuailifiedNum + form.value.qualifiedNum;
|
|
detailInfo.value.totalQuailifiedNum + form.value.qualifiedNum;
|
|
@@ -639,10 +489,10 @@ const handleSave = () => {
|
|
proxy.$modal
|
|
proxy.$modal
|
|
.confirm(
|
|
.confirm(
|
|
"合格数为投产量" +
|
|
"合格数为投产量" +
|
|
- percent +
|
|
|
|
- "%,超出投产量" +
|
|
|
|
- num +
|
|
|
|
- "。 是否继续保存!"
|
|
|
|
|
|
+ percent +
|
|
|
|
+ "%,超出投产量" +
|
|
|
|
+ num +
|
|
|
|
+ "。 是否继续保存!"
|
|
)
|
|
)
|
|
.then(function () {
|
|
.then(function () {
|
|
updateDayworkItem();
|
|
updateDayworkItem();
|
|
@@ -690,23 +540,23 @@ function handleDeleteReject(row) {
|
|
//查询废品信息
|
|
//查询废品信息
|
|
function handleQueryReject() {
|
|
function handleQueryReject() {
|
|
getDayworkItemRejectList({ dayworkItemId: detailInfo.value.id }).then(
|
|
getDayworkItemRejectList({ dayworkItemId: detailInfo.value.id }).then(
|
|
- (response) => {
|
|
|
|
- if (response.code == 200) {
|
|
|
|
- for (let i = 0; i < response.data.length; i++) {
|
|
|
|
- response.data[i].rejectNum = parseInt(response.data[i].rejectNum);
|
|
|
|
- response.data[i].type = response.data[i].type+'';
|
|
|
|
- if(sortProductInspection.value.length > 0) {
|
|
|
|
- response.data[i].standardList = sortProductInspection.value.filter(item =>response.data[i].type == item.type).map(item => {
|
|
|
|
- return { value :item.inspectionInstructionId , label : item.standard }
|
|
|
|
|
|
+ (response) => {
|
|
|
|
+ if (response.code == 200) {
|
|
|
|
+ for (let i = 0; i < response.data.length; i++) {
|
|
|
|
+ response.data[i].rejectNum = parseInt(response.data[i].rejectNum);
|
|
|
|
+ response.data[i].type = response.data[i].type + '';
|
|
|
|
+ if (sortProductInspection.value.length > 0) {
|
|
|
|
+ response.data[i].standardList = sortProductInspection.value.filter(item => response.data[i].type == item.type).map(item => {
|
|
|
|
+ return { value: item.inspectionInstructionId, label: item.standard }
|
|
})
|
|
})
|
|
- response.data[i].sortStandard = response.data[i].standardList.filter(item => response.data[i].checkStandard == item.label)[0].value
|
|
|
|
- console.log( response.data[i].sortStandard)
|
|
|
|
|
|
+ response.data[i].sortStandard = response.data[i].standardList.filter(item => response.data[i].checkStandard == item.label)[0].value
|
|
|
|
+ console.log(response.data[i].sortStandard)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- form.value.groupRejectList = response.data;
|
|
|
|
- }
|
|
|
|
|
|
+ form.value.groupRejectList = response.data;
|
|
}
|
|
}
|
|
- );
|
|
|
|
|
|
+ }
|
|
|
|
+ );
|
|
}
|
|
}
|
|
|
|
|
|
//添加废弃信息
|
|
//添加废弃信息
|
|
@@ -760,12 +610,12 @@ function handleChangeStatus() {
|
|
|
|
|
|
function handleChangeType(row, arg) {
|
|
function handleChangeType(row, arg) {
|
|
row.checkStandard = null
|
|
row.checkStandard = null
|
|
- if(sortProductInspection.value.length > 0) {
|
|
|
|
- row.standardList = sortProductInspection.value.filter(item =>row.type == item.type).map(item => {
|
|
|
|
- return { value :item.inspectionInstructionId , label : item.standard }
|
|
|
|
- })
|
|
|
|
- row.sortStandard = row.standardList.filter(item => row.checkStandard == item.label)[0]
|
|
|
|
-}
|
|
|
|
|
|
+ if (sortProductInspection.value.length > 0) {
|
|
|
|
+ row.standardList = sortProductInspection.value.filter(item => row.type == item.type).map(item => {
|
|
|
|
+ return { value: item.inspectionInstructionId, label: item.standard }
|
|
|
|
+ })
|
|
|
|
+ row.sortStandard = row.standardList.filter(item => row.checkStandard == item.label)[0]
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/** 取消按钮 */
|
|
/** 取消按钮 */
|