Browse Source

2026-06-12

检验增加【异常修改】功能
master
fengyuan_yang 2 days ago
parent
commit
40dd26793d
  1. 174
      src/views/modules/qc/FQCResultEntry.vue
  2. 174
      src/views/modules/qc/IPQCResultEntry.vue
  3. 176
      src/views/modules/qc/IQCResultEntry.vue
  4. 171
      src/views/modules/qc/OQCResultEntry.vue

174
src/views/modules/qc/FQCResultEntry.vue

@ -299,12 +299,13 @@
fixed="right" fixed="right"
header-align="center" header-align="center"
align="center" align="center"
width="130"
width="180"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link style="cursor: pointer" v-if="!authDetail && scope.row.state === '未开始'" @click="actionModal(scope.row)">开始检验</el-link> <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state === '未开始'" @click="actionModal(scope.row)">开始检验</el-link>
<el-link style="cursor: pointer" v-if="!authDetail && scope.row.state !== '未开始'" @click="detailModal(scope.row)">检验单</el-link> <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state !== '未开始'" @click="detailModal(scope.row)">检验单</el-link>
<el-link style="cursor: pointer" v-if="!authFile" @click="getFileContentData(scope.row)">工作文件</el-link> <el-link style="cursor: pointer" v-if="!authFile" @click="getFileContentData(scope.row)">工作文件</el-link>
<el-link style="cursor: pointer" v-if="!authExceptionModify && scope.row.state === '已完成'" @click="abnormalModifyModal(scope.row)">异常修改</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -447,6 +448,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
v-drag v-drag
:visible.sync="detailInformationFlag" :visible.sync="detailInformationFlag"
@close="closeDetailDialog"
width="1200px" width="1200px"
top="2vh" top="2vh"
custom-class="fqc-inspection-dialog"> custom-class="fqc-inspection-dialog">
@ -492,7 +494,7 @@
<el-col :span="3"> <el-col :span="3">
<div class="info-item"> <div class="info-item">
<label> <label>
<span v-if="detailData.submitFlag === 'Y'">协同人员</span>
<span v-if="isDetailReadonly">协同人员</span>
<a v-else style="cursor: pointer" @click="getOperatorList">协同人员</a> <a v-else style="cursor: pointer" @click="getOperatorList">协同人员</a>
</label> </label>
<el-input v-model="detailData.operatorName" readonly size="small"></el-input> <el-input v-model="detailData.operatorName" readonly size="small"></el-input>
@ -501,7 +503,7 @@
<el-col :span="4"> <el-col :span="4">
<div class="info-item"> <div class="info-item">
<label> <label>
<span v-if="detailData.submitFlag === 'Y'">责任人</span>
<span v-if="isDetailReadonly">责任人</span>
<a v-else style="cursor: pointer" @click="getResponsiblePersonList">责任人</a> <a v-else style="cursor: pointer" @click="getResponsiblePersonList">责任人</a>
</label> </label>
<el-input v-model="detailData.responsiblePersonName" readonly size="small"></el-input> <el-input v-model="detailData.responsiblePersonName" readonly size="small"></el-input>
@ -525,7 +527,7 @@
<el-col :span="4"> <el-col :span="4">
<div class="info-item"> <div class="info-item">
<label>合格数量</label> <label>合格数量</label>
<el-input-number :controls="false" :step="0" min="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.passQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" min="0" v-if="isDetailReadonly" v-model="detailData.passQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" min="0" v-else v-model="detailData.passQty" size="small" style="width: 100%"></el-input-number> <el-input-number :controls="false" :step="0" min="0" v-else v-model="detailData.passQty" size="small" style="width: 100%"></el-input-number>
</div> </div>
</el-col> </el-col>
@ -538,7 +540,7 @@
<el-col :span="4"> <el-col :span="4">
<div class="info-item"> <div class="info-item">
<label>不合格项目数量</label> <label>不合格项目数量</label>
<el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.unqualifiedQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" v-if="isDetailReadonly" v-model="detailData.unqualifiedQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" v-else v-model="detailData.unqualifiedQty" size="small" style="width: 100%"></el-input-number> <el-input-number :controls="false" :step="0" v-else v-model="detailData.unqualifiedQty" size="small" style="width: 100%"></el-input-number>
</div> </div>
</el-col> </el-col>
@ -560,7 +562,7 @@
<el-col :span="3"> <el-col :span="3">
<div class="info-item"> <div class="info-item">
<label>检验结论</label> <label>检验结论</label>
<el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled size="small" placeholder="请选择" style="width: 100%">
<el-select v-if="isInspectionResultReadonly" v-model="detailData.inspectionResult" disabled size="small" placeholder="请选择" style="width: 100%">
<el-option label="合格" value="合格"></el-option> <el-option label="合格" value="合格"></el-option>
<el-option label="不合格" value="不合格"></el-option> <el-option label="不合格" value="不合格"></el-option>
</el-select> </el-select>
@ -573,14 +575,14 @@
<el-col :span="7"> <el-col :span="7">
<div class="info-item"> <div class="info-item">
<label>质检备注</label> <label>质检备注</label>
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled size="small"></el-input>
<el-input v-if="isDetailReadonly" v-model="detailData.inspectionRemark" disabled size="small"></el-input>
<el-input v-else v-model="detailData.inspectionRemark" size="small"></el-input> <el-input v-else v-model="detailData.inspectionRemark" size="small"></el-input>
</div> </div>
</el-col> </el-col>
<el-col :span="3" v-show="detailData.inspectionResult === '不合格'"> <el-col :span="3" v-show="detailData.inspectionResult === '不合格'">
<div class="info-item"> <div class="info-item">
<label>处置措施</label> <label>处置措施</label>
<el-select v-if="detailData.submitFlag === 'Y'" clearable v-model="detailData.disposalMeasures" disabled size="small" style="width: 100%">
<el-select v-if="isDetailReadonly" clearable v-model="detailData.disposalMeasures" disabled size="small" style="width: 100%">
<el-option <el-option
v-for = "i in disposalMeasuresOptions" v-for = "i in disposalMeasuresOptions"
:key = "i.id" :key = "i.id"
@ -601,7 +603,7 @@
<el-col :span="7" v-show="detailData.inspectionResult === '不合格'"> <el-col :span="7" v-show="detailData.inspectionResult === '不合格'">
<div class="info-item"> <div class="info-item">
<label>处置说明</label> <label>处置说明</label>
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.disposalRemark" disabled size="small"></el-input>
<el-input v-if="isDetailReadonly" v-model="detailData.disposalRemark" disabled size="small"></el-input>
<el-input v-else v-model="detailData.disposalRemark" size="small"></el-input> <el-input v-else v-model="detailData.disposalRemark" size="small"></el-input>
</div> </div>
</el-col> </el-col>
@ -611,7 +613,7 @@
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="action-buttons"> <div class="action-buttons">
<div class="left-actions"> <div class="left-actions">
<el-button v-if="detailData.submitFlag !== 'Y'" type="primary" size="small" :loading="loadFlag" @click="dataAcquisition" icon="el-icon-download">
<el-button v-if="!isDetailReadonly" type="primary" size="small" :loading="loadFlag" @click="dataAcquisition" icon="el-icon-download">
数据采集 数据采集
</el-button> </el-button>
<el-button type="info" size="small" @click="getFileContentData(detailData)" icon="el-icon-folder-opened"> <el-button type="info" size="small" @click="getFileContentData(detailData)" icon="el-icon-folder-opened">
@ -709,7 +711,7 @@
min-width="80" min-width="80"
label="抽样数量"> label="抽样数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.samplingQty" disabled style="height: 11px; width: 98%"></el-input-number>
<el-input-number :controls="false" :step="0" v-if="isDetailReadonly" v-model="scope.row.samplingQty" disabled style="height: 11px; width: 98%"></el-input-number>
<el-input-number :controls="false" :step="0" v-else :ref="`samplingQty${scope.$index}`" v-model="scope.row.samplingQty" @keyup.enter.native="focusNextInput(scope.$index, 'samplingQty')" style="height: 11px; width: 98%"></el-input-number> <el-input-number :controls="false" :step="0" v-else :ref="`samplingQty${scope.$index}`" v-model="scope.row.samplingQty" @keyup.enter.native="focusNextInput(scope.$index, 'samplingQty')" style="height: 11px; width: 98%"></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
@ -720,7 +722,7 @@
min-width="80" min-width="80"
label="不合格数量"> label="不合格数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.unqualifiedQuantity" disabled style="height: 11px; width: 98%"></el-input-number>
<el-input-number :controls="false" :step="0" v-if="isDetailReadonly" v-model="scope.row.unqualifiedQuantity" disabled style="height: 11px; width: 98%"></el-input-number>
<el-input-number :controls="false" :step="0" v-else :ref="`unqualifiedQuantity${scope.$index}`" v-model="scope.row.unqualifiedQuantity" @keyup.enter.native="focusNextInput(scope.$index, 'unqualifiedQuantity')" style="height: 11px; width: 98%"></el-input-number> <el-input-number :controls="false" :step="0" v-else :ref="`unqualifiedQuantity${scope.$index}`" v-model="scope.row.unqualifiedQuantity" @keyup.enter.native="focusNextInput(scope.$index, 'unqualifiedQuantity')" style="height: 11px; width: 98%"></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
@ -731,7 +733,7 @@
min-width="75" min-width="75"
label="项目检验结论"> label="项目检验结论">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select :class="{redElSelect:scope.row.itemResult === 'N', greenElSelect:scope.row.itemResult === 'Y'}" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.itemResult" disabled style="height: 11px" >
<el-select :class="{redElSelect:scope.row.itemResult === 'N', greenElSelect:scope.row.itemResult === 'Y'}" v-if="isItemResultReadonly" v-model="scope.row.itemResult" disabled style="height: 11px" >
<el-option label="合格" value="Y" style="color: green"></el-option> <el-option label="合格" value="Y" style="color: green"></el-option>
<el-option label="不合格" value="N" style="color: red"></el-option> <el-option label="不合格" value="N" style="color: red"></el-option>
</el-select> </el-select>
@ -746,8 +748,8 @@
<!-- 底部操作按钮 --> <!-- 底部操作按钮 -->
<div class="dialog-footer"> <div class="dialog-footer">
<el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
<el-button v-if="detailData.state === '待检验' && !exceptionModifyMode" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核' || exceptionModifyMode" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
<el-button @click="detailInformationFlag=false">关闭</el-button> <el-button @click="detailInformationFlag=false">关闭</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -771,43 +773,43 @@
<el-table-column label="序号" align="center" prop="num" width="50"></el-table-column> <el-table-column label="序号" align="center" prop="num" width="50"></el-table-column>
<el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="120"> <el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="120">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input> <el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="120"> <el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="120">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input> <el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="150"> <el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit==='Y'" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值A"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值A"></el-input> <el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值A"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150"> <el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `d`" v-model="templateTableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input> <el-input v-else :ref="`${row.xh-1}` + `d`" v-model="templateTableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueC" header-align="center" align="center" :required="true" label="实测值C" width="150"> <el-table-column prop="subDetailValueC" header-align="center" align="center" :required="true" label="实测值C" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueC" readonly placeholder="请输入实测值C"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueC" readonly placeholder="请输入实测值C"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `e`" v-model="templateTableData[row.xh-1].subDetailValueC" @keyup.enter.native="nextFocus5(row.xh-1)" placeholder="请输入实测值C"></el-input> <el-input v-else :ref="`${row.xh-1}` + `e`" v-model="templateTableData[row.xh-1].subDetailValueC" @keyup.enter.native="nextFocus5(row.xh-1)" placeholder="请输入实测值C"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueD" header-align="center" align="center" :required="true" label="实测值D" width="150"> <el-table-column prop="subDetailValueD" header-align="center" align="center" :required="true" label="实测值D" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueD" readonly placeholder="请输入实测值D"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueD" readonly placeholder="请输入实测值D"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `f`" v-model="templateTableData[row.xh-1].subDetailValueD" @keyup.enter.native="nextFocus6(row.xh-1)" placeholder="请输入实测值D"></el-input> <el-input v-else :ref="`${row.xh-1}` + `f`" v-model="templateTableData[row.xh-1].subDetailValueD" @keyup.enter.native="nextFocus6(row.xh-1)" placeholder="请输入实测值D"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueE" header-align="center" align="center" :required="true" label="实测值E" width="150"> <el-table-column prop="subDetailValueE" header-align="center" align="center" :required="true" label="实测值E" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueE" readonly placeholder="请输入实测值E"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueE" readonly placeholder="请输入实测值E"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `g`" v-model="templateTableData[row.xh-1].subDetailValueE" @keyup.enter.native="nextFocus7(row.xh-1)" placeholder="请输入实测值E"></el-input> <el-input v-else :ref="`${row.xh-1}` + `g`" v-model="templateTableData[row.xh-1].subDetailValueE" @keyup.enter.native="nextFocus7(row.xh-1)" placeholder="请输入实测值E"></el-input>
</template> </template>
</el-table-column> </el-table-column>
@ -824,7 +826,7 @@
</el-pagination> </el-pagination>
</div> </div>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button v-if="detailData.submitFlag !== 'Y'" type="primary" @click="saveSubDetailResult">保存</el-button>
<el-button v-if="!isDetailReadonly" type="primary" @click="saveSubDetailResult">保存</el-button>
<el-button type="primary" @click="subDetailFlag = false">关闭</el-button> <el-button type="primary" @click="subDetailFlag = false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -1328,6 +1330,15 @@
} }
return this.tableData.slice(start,end) return this.tableData.slice(start,end)
}, },
isDetailReadonly () {
return this.detailData.submitFlag === 'Y' && !this.exceptionModifyMode
},
isInspectionResultReadonly () {
return this.isDetailReadonly || this.exceptionModifyMode
},
isItemResultReadonly () {
return this.isDetailReadonly || this.exceptionModifyMode
},
// //
exportFields () { exportFields () {
let fields = {} let fields = {}
@ -2678,6 +2689,10 @@
authDelete: false, authDelete: false,
authDetail: false, authDetail: false,
authFile: false, authFile: false,
authExceptionModify: false,
exceptionModifyMode: false,
exceptionModifyInspectionResult: '',
exceptionModifyItemResultMap: {},
menuId: this.$route.meta.menuId, menuId: this.$route.meta.menuId,
roleList: [], roleList: [],
operatorList: [], operatorList: [],
@ -3871,6 +3886,7 @@
// //
saveDetailInformation (type) { saveDetailInformation (type) {
this.preserveExceptionLockedFields()
this.saveInformationData.site = this.detailData.site this.saveInformationData.site = this.detailData.site
this.saveInformationData.buNo = this.detailData.buNo this.saveInformationData.buNo = this.detailData.buNo
this.saveInformationData.inspectionNo = this.detailData.inspectionNo this.saveInformationData.inspectionNo = this.detailData.inspectionNo
@ -3890,7 +3906,7 @@
this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty
this.saveInformationData.type = type
this.saveInformationData.type = this.exceptionModifyMode ? '3' : type
this.transferLoadFlag = true this.transferLoadFlag = true
saveFQCDetailedRecord(this.saveInformationData).then(({data}) => { saveFQCDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
@ -3911,6 +3927,36 @@
}) })
}, },
abnormalModifyModal (row) {
this.detailModal(row, true)
},
closeDetailDialog () {
this.exceptionModifyMode = false
this.exceptionModifyInspectionResult = ''
this.exceptionModifyItemResultMap = {}
},
preserveExceptionLockedFields () {
if (!this.exceptionModifyMode) {
return
}
this.detailData.inspectionResult = this.exceptionModifyInspectionResult
this.detailList.forEach(item => {
const originItemResult = this.exceptionModifyItemResultMap[item.itemNo]
if (originItemResult !== undefined) {
item.itemResult = originItemResult
}
})
},
isSubDetailReadonly (row) {
if (!row) {
return true
}
return row.isSubmit === 'Y' && !this.exceptionModifyMode
},
// //
actionModal (row) { actionModal (row) {
this.actionData = { this.actionData = {
@ -3960,7 +4006,10 @@
}, },
// //
detailModal (row) {
detailModal (row, exceptionModifyMode = false) {
this.exceptionModifyMode = exceptionModifyMode
this.exceptionModifyInspectionResult = ''
this.exceptionModifyItemResultMap = {}
this.detailData.site = row.site this.detailData.site = row.site
this.detailData.buNo = row.buNo this.detailData.buNo = row.buNo
this.detailData.inspectionNo = row.inspectionNo this.detailData.inspectionNo = row.inspectionNo
@ -3988,6 +4037,9 @@
this.detailData.responsiblePersonName = row.responsiblePersonName this.detailData.responsiblePersonName = row.responsiblePersonName
this.detailData.state = row.state this.detailData.state = row.state
this.detailData.spec = row.spec this.detailData.spec = row.spec
if (this.exceptionModifyMode) {
this.exceptionModifyInspectionResult = row.inspectionResult
}
if (row.state === '待检验') { if (row.state === '待检验') {
this.detailData.passQty = row.samplingQty this.detailData.passQty = row.samplingQty
} else { } else {
@ -4004,8 +4056,16 @@
fqcDetailSearch(this.detailData).then(({data}) => { fqcDetailSearch(this.detailData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.detailList = data.rows this.detailList = data.rows
if (this.exceptionModifyMode) {
let itemResultMap = {}
this.detailList.forEach(item => {
itemResultMap[item.itemNo] = item.itemResult
})
this.exceptionModifyItemResultMap = itemResultMap
}
} else { } else {
this.detailList = [] this.detailList = []
this.exceptionModifyItemResultMap = {}
} }
}) })
}, },
@ -4139,6 +4199,19 @@
// //
handleAddBtn (td) { handleAddBtn (td) {
if (this.exceptionModifyMode) {
let obj = {
subDetailValue: '',
samplingLocation: '',
samplingLocationB: '',
subDetailValueB: '',
subDetailValueC: '',
subDetailValueD: '',
subDetailValueE: '',
}
this.tableData.push(obj)
return
}
checkFQCIsSubmit(td).then(({data}) => { checkFQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) { if (data.flag !== 1) {
let obj = { let obj = {
@ -4159,6 +4232,10 @@
// //
batchHandleAdd (td) { batchHandleAdd (td) {
if (this.exceptionModifyMode) {
this.batchHandleAddModalFlag = true
return
}
checkFQCIsSubmit(td).then(({data}) => { checkFQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) { if (data.flag !== 1) {
this.batchHandleAddModalFlag = true this.batchHandleAddModalFlag = true
@ -4240,6 +4317,9 @@
}) })
}, },
updateItemResult(row){ updateItemResult(row){
if (this.exceptionModifyMode) {
return
}
if (row.maxValue == null && row.minValue == null&&row.defaultValue==null) { if (row.maxValue == null && row.minValue == null&&row.defaultValue==null) {
this.$message.success("tuichu") this.$message.success("tuichu")
return; return;
@ -4271,6 +4351,42 @@
// //
handleDeleteBtn (td) { handleDeleteBtn (td) {
if (this.exceptionModifyMode) {
if (this.checkedDetail.length === 0) {
this.$alert("请先选择要删除的数据", "提示", {
confirmButtonText: "确定",
});
} else {
this.$confirm("请是否确认删除该子明细记录?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
callback: (action) => {
if (action === "confirm") {
let val = this.checkedDetail;
val.forEach((val, index) => {
this.tableData.splice(this.tableData.indexOf(val), 1)
if (this.templateTableData.length === 0) {
this.pageIndex2--
}
})
this.$message({
message: "删除成功!",
type: "success",
})
return
} else {
this.$message({
message: "已取消删除操作",
type: "warning",
})
return
}
},
})
}
return
}
checkFQCIsSubmit(td).then(({data}) => { checkFQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) { if (data.flag !== 1) {
if (this.checkedDetail.length === 0) { if (this.checkedDetail.length === 0) {
@ -4327,7 +4443,9 @@
saveFQCSubDetailed(this.subDetailData).then(({data}) => { saveFQCSubDetailed(this.subDetailData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
if (data.count > 0) { if (data.count > 0) {
if (!this.exceptionModifyMode) {
this.subDetailData.itemResult = 'N' this.subDetailData.itemResult = 'N'
}
this.subDetailData.unqualifiedQuantity = data.count this.subDetailData.unqualifiedQuantity = data.count
} }
if (this.subDetailData.subDetailValues.length > 0) { if (this.subDetailData.subDetailValues.length > 0) {
@ -4335,8 +4453,10 @@
} else { } else {
this.subDetailData.subDetailRecordNum = -1 this.subDetailData.subDetailRecordNum = -1
this.subDetailData.unqualifiedQuantity = 0 this.subDetailData.unqualifiedQuantity = 0
if (!this.exceptionModifyMode) {
this.subDetailData.itemResult = 'Y' this.subDetailData.itemResult = 'Y'
} }
}
this.subDetailFlag = false this.subDetailFlag = false
this.tableData = [] this.tableData = []
this.$message.success('操作成功') this.$message.success('操作成功')
@ -4450,7 +4570,7 @@
if (val[this.detailList[i].itemNo] != null) { if (val[this.detailList[i].itemNo] != null) {
this.detailList[i].subDetailRecordNum = 1 this.detailList[i].subDetailRecordNum = 1
} }
if (val[this.detailList[i].itemNo] > 0) {
if (!this.exceptionModifyMode && val[this.detailList[i].itemNo] > 0) {
this.detailList[i].itemResult = 'N' this.detailList[i].itemResult = 'N'
} }
} }
@ -4503,6 +4623,7 @@
let detailFlag = this.isAuth(this.menuId + ":detail") let detailFlag = this.isAuth(this.menuId + ":detail")
let fileFlag = this.isAuth(this.menuId + ":file") let fileFlag = this.isAuth(this.menuId + ":file")
let cancelCheckFlag = this.isAuth(this.menuId + ":cancelCheck") let cancelCheckFlag = this.isAuth(this.menuId + ":cancelCheck")
let exceptionModifyFlag = this.isAuth(this.menuId + ":exceptionModify")
// //
this.authSearch = !searchFlag this.authSearch = !searchFlag
this.authCheck = !checkFlag this.authCheck = !checkFlag
@ -4511,6 +4632,7 @@
this.authDetail = !detailFlag this.authDetail = !detailFlag
this.authFile = !fileFlag this.authFile = !fileFlag
this.authCancelCheck = !cancelCheckFlag this.authCancelCheck = !cancelCheckFlag
this.authExceptionModify = !exceptionModifyFlag
}, },
// ======================== FQC ======================== // ======================== FQC ========================

174
src/views/modules/qc/IPQCResultEntry.vue

@ -328,12 +328,13 @@
fixed="right" fixed="right"
header-align="center" header-align="center"
align="center" align="center"
width="130"
width="180"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link style="cursor: pointer" v-if="!authDetail && scope.row.state === '未开始'" @click="actionModal(scope.row)">开始检验</el-link> <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state === '未开始'" @click="actionModal(scope.row)">开始检验</el-link>
<el-link style="cursor: pointer" v-if="!authDetail && scope.row.state !== '未开始'" @click="detailModal(scope.row)">检验单</el-link> <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state !== '未开始'" @click="detailModal(scope.row)">检验单</el-link>
<el-link style="cursor: pointer" v-if="!authFile" @click="getFileContentData(scope.row)">工作文件</el-link> <el-link style="cursor: pointer" v-if="!authFile" @click="getFileContentData(scope.row)">工作文件</el-link>
<el-link style="cursor: pointer" v-if="!authExceptionModify && scope.row.state === '已完成'" @click="abnormalModifyModal(scope.row)">异常修改</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -486,6 +487,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
v-drag v-drag
:visible.sync="detailInformationFlag" :visible.sync="detailInformationFlag"
@close="closeDetailDialog"
width="1200px" width="1200px"
top="2vh" top="2vh"
custom-class="ipqc-inspection-dialog"> custom-class="ipqc-inspection-dialog">
@ -532,7 +534,7 @@
<el-col :span="4"> <el-col :span="4">
<div class="info-item"> <div class="info-item">
<label> <label>
<span v-if="detailData.submitFlag === 'Y'">协同人员</span>
<span v-if="isDetailReadonly">协同人员</span>
<a v-else style="cursor: pointer" @click="getOperatorList">协同人员</a> <a v-else style="cursor: pointer" @click="getOperatorList">协同人员</a>
</label> </label>
<el-input v-model="detailData.operatorName" readonly size="small"></el-input> <el-input v-model="detailData.operatorName" readonly size="small"></el-input>
@ -541,7 +543,7 @@
<el-col :span="3"> <el-col :span="3">
<div class="info-item"> <div class="info-item">
<label> <label>
<span v-if="detailData.submitFlag === 'Y'">责任人</span>
<span v-if="isDetailReadonly">责任人</span>
<a v-else style="cursor: pointer" @click="getResponsiblePersonList">责任人</a> <a v-else style="cursor: pointer" @click="getResponsiblePersonList">责任人</a>
</label> </label>
<el-input v-model="detailData.responsiblePersonName" readonly size="small"></el-input> <el-input v-model="detailData.responsiblePersonName" readonly size="small"></el-input>
@ -565,7 +567,7 @@
<el-col :span="3"> <el-col :span="3">
<div class="info-item"> <div class="info-item">
<label>合格数量</label> <label>合格数量</label>
<el-input-number :controls="false" :step="0" min="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.passQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" min="0" v-if="isDetailReadonly" v-model="detailData.passQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" min="0" v-else v-model="detailData.passQty" size="small" style="width: 100%"></el-input-number> <el-input-number :controls="false" :step="0" min="0" v-else v-model="detailData.passQty" size="small" style="width: 100%"></el-input-number>
</div> </div>
</el-col> </el-col>
@ -578,7 +580,7 @@
<el-col :span="3"> <el-col :span="3">
<div class="info-item"> <div class="info-item">
<label>不合格项目数量</label> <label>不合格项目数量</label>
<el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.unqualifiedQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" v-if="isDetailReadonly" v-model="detailData.unqualifiedQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" v-else v-model="detailData.unqualifiedQty" size="small" style="width: 100%"></el-input-number> <el-input-number :controls="false" :step="0" v-else v-model="detailData.unqualifiedQty" size="small" style="width: 100%"></el-input-number>
</div> </div>
</el-col> </el-col>
@ -612,7 +614,7 @@
<el-col :span="3"> <el-col :span="3">
<div class="info-item"> <div class="info-item">
<label>检验结论</label> <label>检验结论</label>
<el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled size="small" placeholder="请选择" style="width: 100%">
<el-select v-if="isInspectionResultReadonly" v-model="detailData.inspectionResult" disabled size="small" placeholder="请选择" style="width: 100%">
<el-option label="合格" value="合格"></el-option> <el-option label="合格" value="合格"></el-option>
<el-option label="不合格" value="不合格"></el-option> <el-option label="不合格" value="不合格"></el-option>
</el-select> </el-select>
@ -625,14 +627,14 @@
<el-col :span="7"> <el-col :span="7">
<div class="info-item"> <div class="info-item">
<label>质检备注</label> <label>质检备注</label>
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled size="small"></el-input>
<el-input v-if="isDetailReadonly" v-model="detailData.inspectionRemark" disabled size="small"></el-input>
<el-input v-else v-model="detailData.inspectionRemark" size="small"></el-input> <el-input v-else v-model="detailData.inspectionRemark" size="small"></el-input>
</div> </div>
</el-col> </el-col>
<el-col :span="3" v-show="detailData.inspectionResult === '不合格'"> <el-col :span="3" v-show="detailData.inspectionResult === '不合格'">
<div class="info-item"> <div class="info-item">
<label>处置措施</label> <label>处置措施</label>
<el-select v-if="detailData.submitFlag === 'Y'" clearable v-model="detailData.disposalMeasures" disabled size="small" style="width: 100%">
<el-select v-if="isDetailReadonly" clearable v-model="detailData.disposalMeasures" disabled size="small" style="width: 100%">
<el-option <el-option
v-for = "i in disposalMeasuresOptions" v-for = "i in disposalMeasuresOptions"
:key = "i.id" :key = "i.id"
@ -653,7 +655,7 @@
<el-col :span="7" v-show="detailData.inspectionResult === '不合格'"> <el-col :span="7" v-show="detailData.inspectionResult === '不合格'">
<div class="info-item"> <div class="info-item">
<label>处置说明</label> <label>处置说明</label>
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.disposalRemark" disabled size="small"></el-input>
<el-input v-if="isDetailReadonly" v-model="detailData.disposalRemark" disabled size="small"></el-input>
<el-input v-else v-model="detailData.disposalRemark" size="small"></el-input> <el-input v-else v-model="detailData.disposalRemark" size="small"></el-input>
</div> </div>
</el-col> </el-col>
@ -663,7 +665,7 @@
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="action-buttons"> <div class="action-buttons">
<div class="left-actions"> <div class="left-actions">
<el-button v-if="detailData.submitFlag !== 'Y'" type="primary" size="small" :loading="loadFlag" @click="dataAcquisition" icon="el-icon-download">
<el-button v-if="!isDetailReadonly" type="primary" size="small" :loading="loadFlag" @click="dataAcquisition" icon="el-icon-download">
数据采集 数据采集
</el-button> </el-button>
<el-button type="info" size="small" @click="getFileContentData(detailData)" icon="el-icon-folder-opened"> <el-button type="info" size="small" @click="getFileContentData(detailData)" icon="el-icon-folder-opened">
@ -760,7 +762,7 @@
min-width="80" min-width="80"
label="抽样数量"> label="抽样数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.samplingQty" disabled style="height: 11px; width:98%"></el-input-number>
<el-input-number :controls="false" :step="0" v-if="isDetailReadonly" v-model="scope.row.samplingQty" disabled style="height: 11px; width:98%"></el-input-number>
<el-input-number :controls="false" :step="0" v-else :ref="`samplingQty${scope.$index}`" v-model="scope.row.samplingQty" @keyup.enter.native="focusNextInput(scope.$index, 'samplingQty')" style="height: 11px; width: 98%"></el-input-number> <el-input-number :controls="false" :step="0" v-else :ref="`samplingQty${scope.$index}`" v-model="scope.row.samplingQty" @keyup.enter.native="focusNextInput(scope.$index, 'samplingQty')" style="height: 11px; width: 98%"></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
@ -771,7 +773,7 @@
min-width="80" min-width="80"
label="不合格数量"> label="不合格数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.unqualifiedQuantity" disabled style="height: 11px; width:98%"></el-input-number>
<el-input-number :controls="false" :step="0" v-if="isDetailReadonly" v-model="scope.row.unqualifiedQuantity" disabled style="height: 11px; width:98%"></el-input-number>
<el-input-number :controls="false" :step="0" v-else :ref="`unqualifiedQuantity${scope.$index}`" v-model="scope.row.unqualifiedQuantity" @keyup.enter.native="focusNextInput(scope.$index, 'unqualifiedQuantity')" style="height: 11px; width: 98%"></el-input-number> <el-input-number :controls="false" :step="0" v-else :ref="`unqualifiedQuantity${scope.$index}`" v-model="scope.row.unqualifiedQuantity" @keyup.enter.native="focusNextInput(scope.$index, 'unqualifiedQuantity')" style="height: 11px; width: 98%"></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
@ -782,7 +784,7 @@
min-width="90" min-width="90"
label="项目检验结论"> label="项目检验结论">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select :class="{redElSelect:scope.row.itemResult === 'N', greenElSelect:scope.row.itemResult === 'Y'}" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.itemResult" disabled style="height: 11px;padding: 0px">
<el-select :class="{redElSelect:scope.row.itemResult === 'N', greenElSelect:scope.row.itemResult === 'Y'}" v-if="isItemResultReadonly" v-model="scope.row.itemResult" disabled style="height: 11px;padding: 0px">
<el-option label="合格" value="Y" style="color: green"></el-option> <el-option label="合格" value="Y" style="color: green"></el-option>
<el-option label="不合格" value="N" style="color: red"></el-option> <el-option label="不合格" value="N" style="color: red"></el-option>
</el-select> </el-select>
@ -797,8 +799,8 @@
<!-- 底部操作按钮 --> <!-- 底部操作按钮 -->
<div class="dialog-footer"> <div class="dialog-footer">
<el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
<el-button v-if="detailData.state === '待检验' && !exceptionModifyMode" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核' || exceptionModifyMode" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
<el-button @click="detailInformationFlag=false">关闭</el-button> <el-button @click="detailInformationFlag=false">关闭</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -822,43 +824,43 @@
<el-table-column label="序号" align="center" prop="num" width="50"></el-table-column> <el-table-column label="序号" align="center" prop="num" width="50"></el-table-column>
<el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="120"> <el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="120">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input> <el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="120"> <el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="120">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input> <el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="150"> <el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值A"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值A"></el-input> <el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值A"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150"> <el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `d`" v-model="templateTableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input> <el-input v-else :ref="`${row.xh-1}` + `d`" v-model="templateTableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueC" header-align="center" align="center" :required="true" label="实测值C" width="150"> <el-table-column prop="subDetailValueC" header-align="center" align="center" :required="true" label="实测值C" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueC" readonly placeholder="请输入实测值C"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueC" readonly placeholder="请输入实测值C"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `e`" v-model="templateTableData[row.xh-1].subDetailValueC" @keyup.enter.native="nextFocus5(row.xh-1)" placeholder="请输入实测值C"></el-input> <el-input v-else :ref="`${row.xh-1}` + `e`" v-model="templateTableData[row.xh-1].subDetailValueC" @keyup.enter.native="nextFocus5(row.xh-1)" placeholder="请输入实测值C"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueD" header-align="center" align="center" :required="true" label="实测值D" width="150"> <el-table-column prop="subDetailValueD" header-align="center" align="center" :required="true" label="实测值D" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueD" readonly placeholder="请输入实测值D"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueD" readonly placeholder="请输入实测值D"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `f`" v-model="templateTableData[row.xh-1].subDetailValueD" @keyup.enter.native="nextFocus6(row.xh-1)" placeholder="请输入实测值D"></el-input> <el-input v-else :ref="`${row.xh-1}` + `f`" v-model="templateTableData[row.xh-1].subDetailValueD" @keyup.enter.native="nextFocus6(row.xh-1)" placeholder="请输入实测值D"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueE" header-align="center" align="center" :required="true" label="实测值E" width="150"> <el-table-column prop="subDetailValueE" header-align="center" align="center" :required="true" label="实测值E" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueE" readonly placeholder="请输入实测值E"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueE" readonly placeholder="请输入实测值E"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `g`" v-model="templateTableData[row.xh-1].subDetailValueE" @keyup.enter.native="nextFocus7(row.xh-1)" placeholder="请输入实测值E"></el-input> <el-input v-else :ref="`${row.xh-1}` + `g`" v-model="templateTableData[row.xh-1].subDetailValueE" @keyup.enter.native="nextFocus7(row.xh-1)" placeholder="请输入实测值E"></el-input>
</template> </template>
</el-table-column> </el-table-column>
@ -875,7 +877,7 @@
</el-pagination> </el-pagination>
</div> </div>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button v-if="detailData.submitFlag !== 'Y'" type="primary" @click="saveSubDetailResult">保存</el-button>
<el-button v-if="!isDetailReadonly" type="primary" @click="saveSubDetailResult">保存</el-button>
<el-button type="primary" @click="subDetailFlag = false">关闭</el-button> <el-button type="primary" @click="subDetailFlag = false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -1552,6 +1554,15 @@
} }
return this.tableData.slice(start,end) return this.tableData.slice(start,end)
}, },
isDetailReadonly () {
return this.detailData.submitFlag === 'Y' && !this.exceptionModifyMode
},
isInspectionResultReadonly () {
return this.isDetailReadonly || this.exceptionModifyMode
},
isItemResultReadonly () {
return this.isDetailReadonly || this.exceptionModifyMode
},
// //
exportFields () { exportFields () {
let fields = {} let fields = {}
@ -2955,6 +2966,10 @@
authDelete: false, authDelete: false,
authDetail: false, authDetail: false,
authFile: false, authFile: false,
authExceptionModify: false,
exceptionModifyMode: false,
exceptionModifyInspectionResult: '',
exceptionModifyItemResultMap: {},
menuId: this.$route.meta.menuId, menuId: this.$route.meta.menuId,
roleList: [], roleList: [],
operatorList: [], operatorList: [],
@ -4201,6 +4216,7 @@
// //
saveDetailInformation (type) { saveDetailInformation (type) {
this.preserveExceptionLockedFields()
this.saveInformationData.site = this.detailData.site this.saveInformationData.site = this.detailData.site
this.saveInformationData.buNo = this.detailData.buNo this.saveInformationData.buNo = this.detailData.buNo
this.saveInformationData.inspectionNo = this.detailData.inspectionNo this.saveInformationData.inspectionNo = this.detailData.inspectionNo
@ -4220,7 +4236,7 @@
this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty
this.saveInformationData.type = type
this.saveInformationData.type = this.exceptionModifyMode ? '3' : type
this.transferLoadFlag = true this.transferLoadFlag = true
saveIPQCDetailedRecord(this.saveInformationData).then(({data}) => { saveIPQCDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
@ -4241,6 +4257,36 @@
}) })
}, },
abnormalModifyModal (row) {
this.detailModal(row, true)
},
closeDetailDialog () {
this.exceptionModifyMode = false
this.exceptionModifyInspectionResult = ''
this.exceptionModifyItemResultMap = {}
},
preserveExceptionLockedFields () {
if (!this.exceptionModifyMode) {
return
}
this.detailData.inspectionResult = this.exceptionModifyInspectionResult
this.detailList.forEach(item => {
const originItemResult = this.exceptionModifyItemResultMap[item.itemNo]
if (originItemResult !== undefined) {
item.itemResult = originItemResult
}
})
},
isSubDetailReadonly (row) {
if (!row) {
return true
}
return row.isSubmit === 'Y' && !this.exceptionModifyMode
},
// //
actionModal (row) { actionModal (row) {
@ -4291,7 +4337,10 @@
}, },
// //
detailModal (row) {
detailModal (row, exceptionModifyMode = false) {
this.exceptionModifyMode = exceptionModifyMode
this.exceptionModifyInspectionResult = ''
this.exceptionModifyItemResultMap = {}
this.detailData.site = row.site this.detailData.site = row.site
this.detailData.buNo = row.buNo this.detailData.buNo = row.buNo
this.detailData.inspectionNo = row.inspectionNo this.detailData.inspectionNo = row.inspectionNo
@ -4322,6 +4371,9 @@
this.detailData.spec = row.spec this.detailData.spec = row.spec
this.detailData.orderNo = row.orderNo this.detailData.orderNo = row.orderNo
this.detailData.seqNo = row.seqNo this.detailData.seqNo = row.seqNo
if (this.exceptionModifyMode) {
this.exceptionModifyInspectionResult = row.inspectionResult
}
if (row.state === '待检验') { if (row.state === '待检验') {
this.detailData.passQty = row.samplingQty this.detailData.passQty = row.samplingQty
} else { } else {
@ -4338,8 +4390,16 @@
ipqcDetailSearch(this.detailData).then(({data}) => { ipqcDetailSearch(this.detailData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.detailList = data.rows this.detailList = data.rows
if (this.exceptionModifyMode) {
let itemResultMap = {}
this.detailList.forEach(item => {
itemResultMap[item.itemNo] = item.itemResult
})
this.exceptionModifyItemResultMap = itemResultMap
}
} else { } else {
this.detailList = [] this.detailList = []
this.exceptionModifyItemResultMap = {}
} }
}) })
}, },
@ -4473,6 +4533,19 @@
// //
handleAddBtn (td) { handleAddBtn (td) {
if (this.exceptionModifyMode) {
let obj = {
subDetailValue: '',
samplingLocation: '',
samplingLocationB: '',
subDetailValueB: '',
subDetailValueC: '',
subDetailValueD: '',
subDetailValueE: '',
}
this.tableData.push(obj)
return
}
checkIPQCIsSubmit(td).then(({data}) => { checkIPQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) { if (data.flag !== 1) {
let obj = { let obj = {
@ -4493,6 +4566,10 @@
// //
batchHandleAdd (td) { batchHandleAdd (td) {
if (this.exceptionModifyMode) {
this.batchHandleAddModalFlag = true
return
}
checkIPQCIsSubmit(td).then(({data}) => { checkIPQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) { if (data.flag !== 1) {
this.batchHandleAddModalFlag = true this.batchHandleAddModalFlag = true
@ -4574,6 +4651,9 @@
}) })
}, },
updateItemResult(row){ updateItemResult(row){
if (this.exceptionModifyMode) {
return
}
if (row.maxValue == null && row.minValue == null&&row.defaultValue==null) { if (row.maxValue == null && row.minValue == null&&row.defaultValue==null) {
return; return;
} }
@ -4604,6 +4684,42 @@
// //
handleDeleteBtn (td) { handleDeleteBtn (td) {
if (this.exceptionModifyMode) {
if (this.checkedDetail.length === 0) {
this.$alert("请先选择要删除的数据", "提示", {
confirmButtonText: "确定",
})
} else {
this.$confirm("请是否确认删除该子明细记录?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
callback: (action) => {
if (action === "confirm") {
let val = this.checkedDetail
val.forEach((val, index) => {
this.tableData.splice(this.tableData.indexOf(val), 1)
if (this.templateTableData.length === 0) {
this.pageIndex2--
}
})
this.$message({
message: "删除成功!",
type: "success",
})
return
} else {
this.$message({
message: "已取消删除操作",
type: "warning",
})
return
}
},
})
}
return
}
checkIPQCIsSubmit(td).then(({data}) => { checkIPQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) { if (data.flag !== 1) {
if (this.checkedDetail.length === 0) { if (this.checkedDetail.length === 0) {
@ -4657,7 +4773,9 @@
saveIPQCSubDetailed(this.subDetailData).then(({data}) => { saveIPQCSubDetailed(this.subDetailData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
if (data.count > 0) { if (data.count > 0) {
if (!this.exceptionModifyMode) {
this.subDetailData.itemResult = 'N' this.subDetailData.itemResult = 'N'
}
this.subDetailData.unqualifiedQuantity = data.count this.subDetailData.unqualifiedQuantity = data.count
} }
if (this.subDetailData.subDetailValues.length > 0) { if (this.subDetailData.subDetailValues.length > 0) {
@ -4665,8 +4783,10 @@
} else { } else {
this.subDetailData.subDetailRecordNum = -1 this.subDetailData.subDetailRecordNum = -1
this.subDetailData.unqualifiedQuantity = 0 this.subDetailData.unqualifiedQuantity = 0
if (!this.exceptionModifyMode) {
this.subDetailData.itemResult = 'Y' this.subDetailData.itemResult = 'Y'
} }
}
this.subDetailFlag = false this.subDetailFlag = false
this.tableData = [] this.tableData = []
this.$message.success('操作成功') this.$message.success('操作成功')
@ -4781,7 +4901,7 @@
if (val[this.detailList[i].itemNo] != null) { if (val[this.detailList[i].itemNo] != null) {
this.detailList[i].subDetailRecordNum = 1 this.detailList[i].subDetailRecordNum = 1
} }
if (val[this.detailList[i].itemNo] > 0) {
if (!this.exceptionModifyMode && val[this.detailList[i].itemNo] > 0) {
this.detailList[i].itemResult = 'N' this.detailList[i].itemResult = 'N'
} }
} }
@ -4833,6 +4953,7 @@
let detailFlag = this.isAuth(this.menuId + ":detail") let detailFlag = this.isAuth(this.menuId + ":detail")
let fileFlag = this.isAuth(this.menuId + ":file") let fileFlag = this.isAuth(this.menuId + ":file")
let cancelCheckFlag = this.isAuth(this.menuId + ":cancelCheck") let cancelCheckFlag = this.isAuth(this.menuId + ":cancelCheck")
let exceptionModifyFlag = this.isAuth(this.menuId + ":exceptionModify")
// //
this.authSearch = !searchFlag this.authSearch = !searchFlag
this.authCheck = !checkFlag this.authCheck = !checkFlag
@ -4841,6 +4962,7 @@
this.authDetail = !detailFlag this.authDetail = !detailFlag
this.authFile = !fileFlag this.authFile = !fileFlag
this.authCancelCheck = !cancelCheckFlag this.authCancelCheck = !cancelCheckFlag
this.authExceptionModify = !exceptionModifyFlag
}, },
// ======================== ======================== // ======================== ========================

176
src/views/modules/qc/IQCResultEntry.vue

@ -331,12 +331,13 @@
fixed="right" fixed="right"
header-align="center" header-align="center"
align="center" align="center"
width="130"
width="180"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link style="cursor: pointer" v-if="!authDetail && scope.row.state === '未开始'" @click="actionModal(scope.row)">开始检验</el-link> <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state === '未开始'" @click="actionModal(scope.row)">开始检验</el-link>
<el-link style="cursor: pointer" v-if="!authDetail && scope.row.state !== '未开始'" @click="detailModal(scope.row)">检验单</el-link> <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state !== '未开始'" @click="detailModal(scope.row)">检验单</el-link>
<el-link style="cursor: pointer" v-if="!authFile" @click="getFileContentData(scope.row)">工作文件</el-link> <el-link style="cursor: pointer" v-if="!authFile" @click="getFileContentData(scope.row)">工作文件</el-link>
<el-link style="cursor: pointer" v-if="!authExceptionModify && scope.row.state === '已完成'" @click="abnormalModifyModal(scope.row)">异常修改</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -359,6 +360,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
v-drag v-drag
:visible.sync="detailInformationFlag" :visible.sync="detailInformationFlag"
@close="closeDetailDialog"
width="1200px" width="1200px"
top="2vh" top="2vh"
custom-class="iqc-inspection-dialog"> custom-class="iqc-inspection-dialog">
@ -406,7 +408,7 @@
<el-col :span="3"> <el-col :span="3">
<div class="info-item"> <div class="info-item">
<label> <label>
<span v-if="detailData.submitFlag === 'Y'">协同人员</span>
<span v-if="isDetailReadonly">协同人员</span>
<a v-else style="cursor: pointer" @click="getOperatorList">协同人员</a> <a v-else style="cursor: pointer" @click="getOperatorList">协同人员</a>
</label> </label>
<el-input v-model="detailData.operatorName" readonly size="small"></el-input> <el-input v-model="detailData.operatorName" readonly size="small"></el-input>
@ -415,7 +417,7 @@
<el-col :span="4"> <el-col :span="4">
<div class="info-item"> <div class="info-item">
<label> <label>
<span v-if="detailData.submitFlag === 'Y'">责任人</span>
<span v-if="isDetailReadonly">责任人</span>
<a v-else style="cursor: pointer" @click="getResponsiblePersonList">责任人</a> <a v-else style="cursor: pointer" @click="getResponsiblePersonList">责任人</a>
</label> </label>
<el-input v-model="detailData.responsiblePersonName" readonly size="small"></el-input> <el-input v-model="detailData.responsiblePersonName" readonly size="small"></el-input>
@ -445,7 +447,7 @@
<el-col :span="3"> <el-col :span="3">
<div class="info-item"> <div class="info-item">
<label>合格数量</label> <label>合格数量</label>
<el-input-number :controls="false" :step="0" min="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.passQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" min="0" v-if="isDetailReadonly" v-model="detailData.passQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" min="0" v-else v-model="detailData.passQty" @change="passQtyChange" size="small" style="width: 100%"></el-input-number> <el-input-number :controls="false" :step="0" min="0" v-else v-model="detailData.passQty" @change="passQtyChange" size="small" style="width: 100%"></el-input-number>
</div> </div>
</el-col> </el-col>
@ -458,7 +460,7 @@
<el-col :span="3"> <el-col :span="3">
<div class="info-item"> <div class="info-item">
<label>不合格项目数</label> <label>不合格项目数</label>
<el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.unqualifiedQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" v-if="isDetailReadonly" v-model="detailData.unqualifiedQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" v-else v-model="detailData.unqualifiedQty" size="small" style="width: 100%"></el-input-number> <el-input-number :controls="false" :step="0" v-else v-model="detailData.unqualifiedQty" size="small" style="width: 100%"></el-input-number>
</div> </div>
</el-col> </el-col>
@ -486,7 +488,7 @@
<el-col :span="3"> <el-col :span="3">
<div class="info-item"> <div class="info-item">
<label>检验结论</label> <label>检验结论</label>
<el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled size="small" placeholder="请选择" style="width: 100%">
<el-select v-if="isInspectionResultReadonly" v-model="detailData.inspectionResult" disabled size="small" placeholder="请选择" style="width: 100%">
<el-option label="合格" value="合格"></el-option> <el-option label="合格" value="合格"></el-option>
<el-option label="不合格" value="不合格"></el-option> <el-option label="不合格" value="不合格"></el-option>
</el-select> </el-select>
@ -499,14 +501,14 @@
<el-col :span="7"> <el-col :span="7">
<div class="info-item"> <div class="info-item">
<label>质检备注</label> <label>质检备注</label>
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled size="small"></el-input>
<el-input v-if="isDetailReadonly" v-model="detailData.inspectionRemark" disabled size="small"></el-input>
<el-input v-else v-model="detailData.inspectionRemark" size="small"></el-input> <el-input v-else v-model="detailData.inspectionRemark" size="small"></el-input>
</div> </div>
</el-col> </el-col>
<el-col :span="3" v-show="detailData.inspectionResult === '不合格'"> <el-col :span="3" v-show="detailData.inspectionResult === '不合格'">
<div class="info-item"> <div class="info-item">
<label>处置措施</label> <label>处置措施</label>
<el-select v-if="detailData.submitFlag === 'Y'" clearable v-model="detailData.disposalMeasures" disabled size="small" style="width: 100%">
<el-select v-if="isDetailReadonly" clearable v-model="detailData.disposalMeasures" disabled size="small" style="width: 100%">
<el-option <el-option
v-for = "i in disposalMeasuresOptions" v-for = "i in disposalMeasuresOptions"
:key = "i.id" :key = "i.id"
@ -527,7 +529,7 @@
<el-col :span="7" v-show="detailData.inspectionResult === '不合格'"> <el-col :span="7" v-show="detailData.inspectionResult === '不合格'">
<div class="info-item"> <div class="info-item">
<label>处置说明</label> <label>处置说明</label>
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.disposalRemark" disabled size="small"></el-input>
<el-input v-if="isDetailReadonly" v-model="detailData.disposalRemark" disabled size="small"></el-input>
<el-input v-else v-model="detailData.disposalRemark" size="small"></el-input> <el-input v-else v-model="detailData.disposalRemark" size="small"></el-input>
</div> </div>
</el-col> </el-col>
@ -542,7 +544,7 @@
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="action-buttons"> <div class="action-buttons">
<div class="left-actions"> <div class="left-actions">
<el-button v-if="detailData.submitFlag !== 'Y'" type="primary" size="small" :loading="loadFlag" @click="dataAcquisition" icon="el-icon-download">
<el-button v-if="!isDetailReadonly" type="primary" size="small" :loading="loadFlag" @click="dataAcquisition" icon="el-icon-download">
数据采集 数据采集
</el-button> </el-button>
<el-button type="info" size="small" @click="getFileContentData(detailData)" icon="el-icon-folder-opened"> <el-button type="info" size="small" @click="getFileContentData(detailData)" icon="el-icon-folder-opened">
@ -640,7 +642,7 @@
min-width="80" min-width="80"
label="抽样数量"> label="抽样数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.samplingQty" disabled style="height: 11px; width: 98%"></el-input-number>
<el-input-number :controls="false" :step="0" v-if="isDetailReadonly" v-model="scope.row.samplingQty" disabled style="height: 11px; width: 98%"></el-input-number>
<el-input-number :controls="false" :step="0" v-else :ref="`samplingQty${scope.$index}`" v-model="scope.row.samplingQty" @keyup.enter.native="focusNextInput(scope.$index, 'samplingQty')" style="height: 11px; width: 98%"></el-input-number> <el-input-number :controls="false" :step="0" v-else :ref="`samplingQty${scope.$index}`" v-model="scope.row.samplingQty" @keyup.enter.native="focusNextInput(scope.$index, 'samplingQty')" style="height: 11px; width: 98%"></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
@ -651,7 +653,7 @@
min-width="80" min-width="80"
label="不合格数量"> label="不合格数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.unqualifiedQuantity" disabled style="height: 11px; width: 98%"></el-input-number>
<el-input-number :controls="false" :step="0" v-if="isDetailReadonly" v-model="scope.row.unqualifiedQuantity" disabled style="height: 11px; width: 98%"></el-input-number>
<el-input-number :controls="false" :step="0" v-else :ref="`unqualifiedQuantity${scope.$index}`" v-model="scope.row.unqualifiedQuantity" @keyup.enter.native="focusNextInput(scope.$index, 'unqualifiedQuantity')" style="height: 11px; width: 98%"></el-input-number> <el-input-number :controls="false" :step="0" v-else :ref="`unqualifiedQuantity${scope.$index}`" v-model="scope.row.unqualifiedQuantity" @keyup.enter.native="focusNextInput(scope.$index, 'unqualifiedQuantity')" style="height: 11px; width: 98%"></el-input-number>
</template> </template>
</el-table-column> </el-table-column>
@ -662,7 +664,7 @@
min-width="90" min-width="90"
label="项目检验结论"> label="项目检验结论">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select :class="{redElSelect:scope.row.itemResult === 'N', greenElSelect:scope.row.itemResult === 'Y'}" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.itemResult" disabled style="height: 11px;padding: 0px" >
<el-select :class="{redElSelect:scope.row.itemResult === 'N', greenElSelect:scope.row.itemResult === 'Y'}" v-if="isItemResultReadonly" v-model="scope.row.itemResult" disabled style="height: 11px;padding: 0px" >
<el-option label="合格" value="Y" style="color: green"></el-option> <el-option label="合格" value="Y" style="color: green"></el-option>
<el-option label="不合格" value="N" style="color: red"></el-option> <el-option label="不合格" value="N" style="color: red"></el-option>
</el-select> </el-select>
@ -677,8 +679,8 @@
<!-- 底部操作按钮 --> <!-- 底部操作按钮 -->
<div class="dialog-footer"> <div class="dialog-footer">
<el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
<el-button v-if="detailData.state === '待检验' && !exceptionModifyMode" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核' || exceptionModifyMode" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
<el-button @click="detailInformationFlag=false">关闭</el-button> <el-button @click="detailInformationFlag=false">关闭</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -744,43 +746,43 @@
<el-table-column label="序号" align="center" prop="num" width="50"></el-table-column> <el-table-column label="序号" align="center" prop="num" width="50"></el-table-column>
<el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="120"> <el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="120">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input> <el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="120"> <el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="120">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input> <el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="150"> <el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值A"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值A"></el-input> <el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值A"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150"> <el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `d`" v-model="templateTableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input> <el-input v-else :ref="`${row.xh-1}` + `d`" v-model="templateTableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueC" header-align="center" align="center" :required="true" label="实测值C" width="150"> <el-table-column prop="subDetailValueC" header-align="center" align="center" :required="true" label="实测值C" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueC" readonly placeholder="请输入实测值C"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueC" readonly placeholder="请输入实测值C"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `e`" v-model="templateTableData[row.xh-1].subDetailValueC" @keyup.enter.native="nextFocus5(row.xh-1)" placeholder="请输入实测值C"></el-input> <el-input v-else :ref="`${row.xh-1}` + `e`" v-model="templateTableData[row.xh-1].subDetailValueC" @keyup.enter.native="nextFocus5(row.xh-1)" placeholder="请输入实测值C"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueD" header-align="center" align="center" :required="true" label="实测值D" width="150"> <el-table-column prop="subDetailValueD" header-align="center" align="center" :required="true" label="实测值D" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueD" readonly placeholder="请输入实测值D"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueD" readonly placeholder="请输入实测值D"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `f`" v-model="templateTableData[row.xh-1].subDetailValueD" @keyup.enter.native="nextFocus6(row.xh-1)" placeholder="请输入实测值D"></el-input> <el-input v-else :ref="`${row.xh-1}` + `f`" v-model="templateTableData[row.xh-1].subDetailValueD" @keyup.enter.native="nextFocus6(row.xh-1)" placeholder="请输入实测值D"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueE" header-align="center" align="center" :required="true" label="实测值E" width="150"> <el-table-column prop="subDetailValueE" header-align="center" align="center" :required="true" label="实测值E" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueE" readonly placeholder="请输入实测值E"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueE" readonly placeholder="请输入实测值E"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `g`" v-model="templateTableData[row.xh-1].subDetailValueE" @keyup.enter.native="nextFocus7(row.xh-1)" placeholder="请输入实测值E"></el-input> <el-input v-else :ref="`${row.xh-1}` + `g`" v-model="templateTableData[row.xh-1].subDetailValueE" @keyup.enter.native="nextFocus7(row.xh-1)" placeholder="请输入实测值E"></el-input>
</template> </template>
</el-table-column> </el-table-column>
@ -797,7 +799,7 @@
</el-pagination> </el-pagination>
</div> </div>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button v-if="detailData.submitFlag !== 'Y'" type="primary" @click="saveSubDetailResult">保存</el-button>
<el-button v-if="!isDetailReadonly" type="primary" @click="saveSubDetailResult">保存</el-button>
<el-button type="primary" @click="subDetailFlag = false">关闭</el-button> <el-button type="primary" @click="subDetailFlag = false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -1186,6 +1188,15 @@
} }
return this.tableData.slice(start,end) return this.tableData.slice(start,end)
}, },
isDetailReadonly () {
return this.detailData.submitFlag === 'Y' && !this.exceptionModifyMode
},
isInspectionResultReadonly () {
return this.isDetailReadonly || this.exceptionModifyMode
},
isItemResultReadonly () {
return this.isDetailReadonly || this.exceptionModifyMode
},
// //
exportFields () { exportFields () {
let fields = {} let fields = {}
@ -2243,6 +2254,10 @@
authDelete: false, authDelete: false,
authDetail: false, authDetail: false,
authFile: false, authFile: false,
authExceptionModify: false,
exceptionModifyMode: false,
exceptionModifyInspectionResult: '',
exceptionModifyItemResultMap: {},
menuId: this.$route.meta.menuId, menuId: this.$route.meta.menuId,
roleList: [], roleList: [],
operatorList: [], operatorList: [],
@ -2481,7 +2496,7 @@
this.enforceSamplingQtyNotExceedRollCount() this.enforceSamplingQtyNotExceedRollCount()
}, },
enforceSamplingQtyNotExceedRollCount () { enforceSamplingQtyNotExceedRollCount () {
if (this.detailData.submitFlag === 'Y') return
if (this.isDetailReadonly) return
const samplingQty = this.detailData.samplingQty const samplingQty = this.detailData.samplingQty
if (samplingQty == null) return if (samplingQty == null) return
const rollCount = this.detailData.rollCount const rollCount = this.detailData.rollCount
@ -2498,7 +2513,7 @@
this.enforcePassQtyNotExceedRollCount() this.enforcePassQtyNotExceedRollCount()
}, },
enforcePassQtyNotExceedRollCount () { enforcePassQtyNotExceedRollCount () {
if (this.detailData.submitFlag === 'Y') return
if (this.isDetailReadonly) return
const passQty = this.detailData.passQty const passQty = this.detailData.passQty
if (passQty == null) return if (passQty == null) return
const rollCount = this.detailData.rollCount const rollCount = this.detailData.rollCount
@ -3043,6 +3058,7 @@
// //
saveDetailInformation (type) { saveDetailInformation (type) {
this.preserveExceptionLockedFields()
this.saveInformationData.site = this.detailData.site this.saveInformationData.site = this.detailData.site
this.saveInformationData.buNo = this.detailData.buNo this.saveInformationData.buNo = this.detailData.buNo
this.saveInformationData.inspectionNo = this.detailData.inspectionNo this.saveInformationData.inspectionNo = this.detailData.inspectionNo
@ -3062,7 +3078,7 @@
this.saveInformationData.operator = this.detailData.operator this.saveInformationData.operator = this.detailData.operator
this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson this.saveInformationData.responsiblePerson = this.detailData.responsiblePerson
this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList)) this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
this.saveInformationData.type = type
this.saveInformationData.type = this.exceptionModifyMode ? '3' : type
this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty this.saveInformationData.batchQualifiedQty = this.detailData.batchQualifiedQty == null ? 0 : this.detailData.batchQualifiedQty
@ -3087,6 +3103,36 @@
}) })
}, },
abnormalModifyModal (row) {
this.detailModal(row, true)
},
closeDetailDialog () {
this.exceptionModifyMode = false
this.exceptionModifyInspectionResult = ''
this.exceptionModifyItemResultMap = {}
},
preserveExceptionLockedFields () {
if (!this.exceptionModifyMode) {
return
}
this.detailData.inspectionResult = this.exceptionModifyInspectionResult
this.detailList.forEach(item => {
const originItemResult = this.exceptionModifyItemResultMap[item.itemNo]
if (originItemResult !== undefined) {
item.itemResult = originItemResult
}
})
},
isSubDetailReadonly (row) {
if (!row) {
return true
}
return row.isSubmit === 'Y' && !this.exceptionModifyMode
},
// //
actionModal (row) { actionModal (row) {
this.actionData = { this.actionData = {
@ -3136,7 +3182,10 @@
}, },
// //
detailModal (row) {
detailModal (row, exceptionModifyMode = false) {
this.exceptionModifyMode = exceptionModifyMode
this.exceptionModifyInspectionResult = ''
this.exceptionModifyItemResultMap = {}
this.detailData.site = row.site this.detailData.site = row.site
this.detailData.buNo = row.buNo this.detailData.buNo = row.buNo
this.detailData.inspectionNo = row.inspectionNo this.detailData.inspectionNo = row.inspectionNo
@ -3167,6 +3216,9 @@
this.detailData.invdefinetype = row.invdefinetype this.detailData.invdefinetype = row.invdefinetype
this.detailData.state = row.state this.detailData.state = row.state
this.detailData.spec = row.spec this.detailData.spec = row.spec
if (this.exceptionModifyMode) {
this.exceptionModifyInspectionResult = row.inspectionResult
}
if (row.state === '待检验') { if (row.state === '待检验') {
this.detailData.passQty = row.samplingQty this.detailData.passQty = row.samplingQty
} else { } else {
@ -3185,8 +3237,16 @@
iqcDetailSearch(this.detailData).then(({data}) => { iqcDetailSearch(this.detailData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.detailList = data.rows this.detailList = data.rows
if (this.exceptionModifyMode) {
let itemResultMap = {}
this.detailList.forEach(item => {
itemResultMap[item.itemNo] = item.itemResult
})
this.exceptionModifyItemResultMap = itemResultMap
}
} else { } else {
this.detailList = [] this.detailList = []
this.exceptionModifyItemResultMap = {}
} }
}) })
}, },
@ -3393,6 +3453,19 @@
// //
handleAddBtn (td) { handleAddBtn (td) {
if (this.exceptionModifyMode) {
let obj = {
subDetailValue: '',
samplingLocation: '',
samplingLocationB: '',
subDetailValueB: '',
subDetailValueC: '',
subDetailValueD: '',
subDetailValueE: '',
}
this.tableData.push(obj)
return
}
checkIQCIsSubmit(td).then(({data}) => { checkIQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) { if (data.flag !== 1) {
let obj = { let obj = {
@ -3415,6 +3488,10 @@
// //
batchHandleAdd (td) { batchHandleAdd (td) {
if (this.exceptionModifyMode) {
this.batchHandleAddModalFlag = true
return
}
checkIQCIsSubmit(td).then(({data}) => { checkIQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) { if (data.flag !== 1) {
this.batchHandleAddModalFlag = true this.batchHandleAddModalFlag = true
@ -3500,6 +3577,9 @@
}) })
}, },
updateItemResult(row){ updateItemResult(row){
if (this.exceptionModifyMode) {
return
}
if (row.maxValue == null && row.minValue == null&&row.defaultValue==null) { if (row.maxValue == null && row.minValue == null&&row.defaultValue==null) {
return; return;
} }
@ -3530,6 +3610,40 @@
// //
handleDeleteBtn (td) { handleDeleteBtn (td) {
if (this.exceptionModifyMode) {
if (this.checkedDetail.length === 0) {
this.$alert("请先选择要删除的数据", "提示", {
confirmButtonText: "确定",
})
} else {
this.$confirm("请是否确认删除该子明细记录?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
callback: (action) => {
if (action === "confirm") {
let val = this.checkedDetail
val.forEach((val, index) => {
this.tableData.splice(this.tableData.indexOf(val), 1)
if (this.templateTableData.length === 0) {
this.pageIndex2--
}
})
this.$message({
message: "删除成功!",
type: "success",
})
} else {
this.$message({
message: "已取消删除操作",
type: "warning",
})
}
},
})
}
return
}
checkIQCIsSubmit(td).then(({data}) => { checkIQCIsSubmit(td).then(({data}) => {
if (data.flag !== 1) { if (data.flag !== 1) {
if (this.checkedDetail.length === 0) { if (this.checkedDetail.length === 0) {
@ -3583,7 +3697,9 @@
saveIQCSubDetailed(this.subDetailData).then(({data}) => { saveIQCSubDetailed(this.subDetailData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
if (data.count > 0) { if (data.count > 0) {
if (!this.exceptionModifyMode) {
this.subDetailData.itemResult = 'N' this.subDetailData.itemResult = 'N'
}
this.subDetailData.unqualifiedQuantity = data.count this.subDetailData.unqualifiedQuantity = data.count
} }
if (this.subDetailData.subDetailValues.length > 0) { if (this.subDetailData.subDetailValues.length > 0) {
@ -3591,8 +3707,10 @@
} else { } else {
this.subDetailData.subDetailRecordNum = -1 this.subDetailData.subDetailRecordNum = -1
this.subDetailData.unqualifiedQuantity = 0 this.subDetailData.unqualifiedQuantity = 0
if (!this.exceptionModifyMode) {
this.subDetailData.itemResult = 'Y' this.subDetailData.itemResult = 'Y'
} }
}
this.subDetailFlag = false this.subDetailFlag = false
this.tableData = [] this.tableData = []
this.$message.success('操作成功') this.$message.success('操作成功')
@ -3699,7 +3817,7 @@
if (val[this.detailList[i].itemNo] != null) { if (val[this.detailList[i].itemNo] != null) {
this.detailList[i].subDetailRecordNum = 1 this.detailList[i].subDetailRecordNum = 1
} }
if (val[this.detailList[i].itemNo] > 0) {
if (!this.exceptionModifyMode && val[this.detailList[i].itemNo] > 0) {
this.detailList[i].itemResult = 'N' this.detailList[i].itemResult = 'N'
} }
} }
@ -3715,6 +3833,7 @@
let detailFlag = this.isAuth(this.menuId + ":detail") let detailFlag = this.isAuth(this.menuId + ":detail")
let fileFlag = this.isAuth(this.menuId + ":file") let fileFlag = this.isAuth(this.menuId + ":file")
let cancelCheckFlag = this.isAuth(this.menuId + ":cancelCheck") let cancelCheckFlag = this.isAuth(this.menuId + ":cancelCheck")
let exceptionModifyFlag = this.isAuth(this.menuId + ":exceptionModify")
// //
this.authSearch = !searchFlag this.authSearch = !searchFlag
this.authCheck = !checkFlag this.authCheck = !checkFlag
@ -3723,6 +3842,7 @@
this.authDetail = !detailFlag this.authDetail = !detailFlag
this.authFile = !fileFlag this.authFile = !fileFlag
this.authCancelCheck = !cancelCheckFlag this.authCancelCheck = !cancelCheckFlag
this.authExceptionModify = !exceptionModifyFlag
}, },
// ======================== IQC ======================== // ======================== IQC ========================

171
src/views/modules/qc/OQCResultEntry.vue

@ -291,11 +291,12 @@
fixed="right" fixed="right"
header-align="center" header-align="center"
align="center" align="center"
width="100"
width="160"
label="操作"> label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link style="cursor: pointer" v-if="!authDetail && scope.row.state === '未开始'" @click="actionModal(scope.row)">开始检验</el-link> <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state === '未开始'" @click="actionModal(scope.row)">开始检验</el-link>
<el-link style="cursor: pointer" v-if="!authDetail && scope.row.state !== '未开始'" @click="detailModal(scope.row)">检验单</el-link> <el-link style="cursor: pointer" v-if="!authDetail && scope.row.state !== '未开始'" @click="detailModal(scope.row)">检验单</el-link>
<el-link style="cursor: pointer" v-if="!authExceptionModify && scope.row.state === '已完成'" @click="abnormalModifyModal(scope.row)">异常修改</el-link>
<el-dropdown trigger="click"> <el-dropdown trigger="click">
<el-link style="cursor: pointer;font-size: 12px">更多</el-link> <el-link style="cursor: pointer;font-size: 12px">更多</el-link>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
@ -325,6 +326,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
v-drag v-drag
:visible.sync="detailInformationFlag" :visible.sync="detailInformationFlag"
@close="closeDetailDialog"
width="1200px" width="1200px"
top="2vh" top="2vh"
custom-class="oqc-inspection-dialog"> custom-class="oqc-inspection-dialog">
@ -364,7 +366,7 @@
<el-col :span="4"> <el-col :span="4">
<div class="info-item"> <div class="info-item">
<label> <label>
<span v-if="detailData.submitFlag === 'Y'">协同人员</span>
<span v-if="isDetailReadonly">协同人员</span>
<a v-else style="cursor: pointer" @click="getOperatorList">协同人员</a> <a v-else style="cursor: pointer" @click="getOperatorList">协同人员</a>
</label> </label>
<el-input v-model="detailData.operatorName" readonly size="small"></el-input> <el-input v-model="detailData.operatorName" readonly size="small"></el-input>
@ -373,10 +375,10 @@
<el-col :span="6"> <el-col :span="6">
<div class="info-item"> <div class="info-item">
<label> <label>
<span v-if="detailData.submitFlag === 'Y'">责任人(供应商)</span>
<span v-if="isDetailReadonly">责任人(供应商)</span>
<a v-else style="cursor: pointer" @click="getBaseList(509)">责任人(供应商)</a> <a v-else style="cursor: pointer" @click="getBaseList(509)">责任人(供应商)</a>
</label> </label>
<el-input v-model="detailData.responsiblePerson" :readonly="detailData.submitFlag === 'Y'" size="small"></el-input>
<el-input v-model="detailData.responsiblePerson" :readonly="isDetailReadonly" size="small"></el-input>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -403,7 +405,7 @@
<el-col :span="4"> <el-col :span="4">
<div class="info-item"> <div class="info-item">
<label>合格数量</label> <label>合格数量</label>
<el-input-number :controls="false" :step="0" min="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.passQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" min="0" v-if="isDetailReadonly" v-model="detailData.passQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" min="0" v-else @input="handleInput(detailData.passQty,2)" v-model="detailData.passQty" size="small" style="width: 100%"></el-input-number> <el-input-number :controls="false" :step="0" min="0" v-else @input="handleInput(detailData.passQty,2)" v-model="detailData.passQty" size="small" style="width: 100%"></el-input-number>
</div> </div>
</el-col> </el-col>
@ -416,7 +418,7 @@
<el-col :span="4"> <el-col :span="4">
<div class="info-item"> <div class="info-item">
<label>不合格项目数量</label> <label>不合格项目数量</label>
<el-input-number :controls="false" :step="0" v-if="detailData.submitFlag === 'Y'" v-model="detailData.unqualifiedQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" v-if="isDetailReadonly" v-model="detailData.unqualifiedQty" disabled size="small" style="width: 100%"></el-input-number>
<el-input-number :controls="false" :step="0" v-else @input="handleInput(detailData.unqualifiedQty,1)" v-model="detailData.unqualifiedQty" size="small" style="width: 100%"></el-input-number> <el-input-number :controls="false" :step="0" v-else @input="handleInput(detailData.unqualifiedQty,1)" v-model="detailData.unqualifiedQty" size="small" style="width: 100%"></el-input-number>
</div> </div>
</el-col> </el-col>
@ -432,7 +434,7 @@
<el-col :span="3"> <el-col :span="3">
<div class="info-item"> <div class="info-item">
<label>检验结论</label> <label>检验结论</label>
<el-select v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionResult" disabled size="small" placeholder="请选择" style="width: 100%">
<el-select v-if="isInspectionResultReadonly" v-model="detailData.inspectionResult" disabled size="small" placeholder="请选择" style="width: 100%">
<el-option label="合格" value="合格"></el-option> <el-option label="合格" value="合格"></el-option>
<el-option label="不合格" value="不合格"></el-option> <el-option label="不合格" value="不合格"></el-option>
</el-select> </el-select>
@ -445,14 +447,14 @@
<el-col :span="7"> <el-col :span="7">
<div class="info-item"> <div class="info-item">
<label>质检备注</label> <label>质检备注</label>
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.inspectionRemark" disabled size="small"></el-input>
<el-input v-if="isDetailReadonly" v-model="detailData.inspectionRemark" disabled size="small"></el-input>
<el-input v-else v-model="detailData.inspectionRemark" size="small"></el-input> <el-input v-else v-model="detailData.inspectionRemark" size="small"></el-input>
</div> </div>
</el-col> </el-col>
<el-col :span="3" v-show="detailData.inspectionResult === '不合格'"> <el-col :span="3" v-show="detailData.inspectionResult === '不合格'">
<div class="info-item"> <div class="info-item">
<label>处置措施</label> <label>处置措施</label>
<el-select v-if="detailData.submitFlag === 'Y'" clearable v-model="detailData.disposalMeasures" disabled size="small" style="width: 100%">
<el-select v-if="isDetailReadonly" clearable v-model="detailData.disposalMeasures" disabled size="small" style="width: 100%">
<el-option <el-option
v-for = "i in disposalMeasuresOptions" v-for = "i in disposalMeasuresOptions"
:key = "i.id" :key = "i.id"
@ -473,7 +475,7 @@
<el-col :span="7" v-show="detailData.inspectionResult === '不合格'"> <el-col :span="7" v-show="detailData.inspectionResult === '不合格'">
<div class="info-item"> <div class="info-item">
<label>处置说明</label> <label>处置说明</label>
<el-input v-if="detailData.submitFlag === 'Y'" v-model="detailData.disposalRemark" disabled size="small"></el-input>
<el-input v-if="isDetailReadonly" v-model="detailData.disposalRemark" disabled size="small"></el-input>
<el-input v-else v-model="detailData.disposalRemark" size="small"></el-input> <el-input v-else v-model="detailData.disposalRemark" size="small"></el-input>
</div> </div>
</el-col> </el-col>
@ -576,7 +578,7 @@
min-width="80" min-width="80"
label="抽样数量"> label="抽样数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input class="inlineNumber numInput" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.samplingQty" disabled type="number" style="height: 11px; width: 98%"></el-input>
<el-input class="inlineNumber numInput" v-if="isDetailReadonly" v-model="scope.row.samplingQty" disabled type="number" style="height: 11px; width: 98%"></el-input>
<el-input class="inlineNumber numInput" v-else :ref="`samplingQty${scope.$index}`" v-model="scope.row.samplingQty" type="number" @keyup.enter.native="focusNextInput(scope.$index, 'samplingQty')" style="height: 11px; width: 98%"></el-input> <el-input class="inlineNumber numInput" v-else :ref="`samplingQty${scope.$index}`" v-model="scope.row.samplingQty" type="number" @keyup.enter.native="focusNextInput(scope.$index, 'samplingQty')" style="height: 11px; width: 98%"></el-input>
</template> </template>
</el-table-column> </el-table-column>
@ -587,7 +589,7 @@
min-width="80" min-width="80"
label="不合格数量"> label="不合格数量">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input class="inlineNumber numInput" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.unqualifiedQuantity" disabled type="number" style="height: 11px; width: 98%"></el-input>
<el-input class="inlineNumber numInput" v-if="isDetailReadonly" v-model="scope.row.unqualifiedQuantity" disabled type="number" style="height: 11px; width: 98%"></el-input>
<el-input class="inlineNumber numInput" v-else :ref="`unqualifiedQuantity${scope.$index}`" v-model="scope.row.unqualifiedQuantity" type="number" @keyup.enter.native="focusNextInput(scope.$index, 'unqualifiedQuantity')" style="height: 11px; width: 98%"></el-input> <el-input class="inlineNumber numInput" v-else :ref="`unqualifiedQuantity${scope.$index}`" v-model="scope.row.unqualifiedQuantity" type="number" @keyup.enter.native="focusNextInput(scope.$index, 'unqualifiedQuantity')" style="height: 11px; width: 98%"></el-input>
</template> </template>
</el-table-column> </el-table-column>
@ -598,7 +600,7 @@
min-width="90" min-width="90"
label="项目检验结论"> label="项目检验结论">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select :class="{redElSelect:scope.row.itemResult === 'N', greenElSelect:scope.row.itemResult === 'Y'}" v-if="detailData.submitFlag === 'Y'" v-model="scope.row.itemResult" disabled style="height: 11px;padding: 0px" >
<el-select :class="{redElSelect:scope.row.itemResult === 'N', greenElSelect:scope.row.itemResult === 'Y'}" v-if="isItemResultReadonly" v-model="scope.row.itemResult" disabled style="height: 11px;padding: 0px" >
<el-option label="合格" value="Y" style="color: green"></el-option> <el-option label="合格" value="Y" style="color: green"></el-option>
<el-option label="不合格" value="N" style="color: red"></el-option> <el-option label="不合格" value="N" style="color: red"></el-option>
</el-select> </el-select>
@ -613,8 +615,8 @@
<!-- 底部操作按钮 --> <!-- 底部操作按钮 -->
<div class="dialog-footer"> <div class="dialog-footer">
<el-button v-if="detailData.state === '待检验'" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核'" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
<el-button v-if="detailData.state === '待检验' && !exceptionModifyMode" type="primary" :loading="transferLoadFlag" @click="Transfer('1')">应用</el-button>
<el-button v-if="detailData.state === '待检验' || detailData.state === '待审核' || exceptionModifyMode" type="primary" :loading="transferLoadFlag" @click="Transfer('2')">保存</el-button>
<el-button @click="detailInformationFlag=false">关闭</el-button> <el-button @click="detailInformationFlag=false">关闭</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -685,43 +687,43 @@
<el-table-column label="序号" align="center" prop="rowI" width="50"></el-table-column> <el-table-column label="序号" align="center" prop="rowI" width="50"></el-table-column>
<el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="150"> <el-table-column prop="samplingLocation" header-align="center" align="center" :required="true" label="抽样位置A" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].samplingLocation" readonly placeholder="请输入抽样位置A"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input> <el-input v-else :ref="`${row.xh-1}` + `a`" v-model="templateTableData[row.xh-1].samplingLocation" @keyup.enter.native="nextFocus1(row.xh-1)" placeholder="请输入抽样位置A"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="150"> <el-table-column prop="samplingLocationB" header-align="center" align="center" :required="true" label="抽样位置B" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].samplingLocationB" readonly placeholder="请输入抽样位置B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input> <el-input v-else :ref="`${row.xh-1}` + `b`" v-model="templateTableData[row.xh-1].samplingLocationB" @keyup.enter.native="nextFocus2(row.xh-1)" placeholder="请输入抽样位置B"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="200"> <el-table-column prop="subDetailValue" header-align="center" align="center" :required="true" label="实测值A" width="200">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValue" readonly placeholder="请输入实测值"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值"></el-input> <el-input v-else :ref="`${row.xh-1}` + `c`" v-model="templateTableData[row.xh-1].subDetailValue" @keyup.enter.native="nextFocus3(row.xh-1)" placeholder="请输入实测值"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150"> <el-table-column prop="subDetailValueB" header-align="center" align="center" :required="true" label="实测值B" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueB" readonly placeholder="请输入实测值B"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `d`" v-model="templateTableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input> <el-input v-else :ref="`${row.xh-1}` + `d`" v-model="templateTableData[row.xh-1].subDetailValueB" @keyup.enter.native="nextFocus4(row.xh-1)" placeholder="请输入实测值B"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueC" header-align="center" align="center" :required="true" label="实测值C" width="150"> <el-table-column prop="subDetailValueC" header-align="center" align="center" :required="true" label="实测值C" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueC" readonly placeholder="请输入实测值C"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueC" readonly placeholder="请输入实测值C"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `e`" v-model="templateTableData[row.xh-1].subDetailValueC" @keyup.enter.native="nextFocus5(row.xh-1)" placeholder="请输入实测值C"></el-input> <el-input v-else :ref="`${row.xh-1}` + `e`" v-model="templateTableData[row.xh-1].subDetailValueC" @keyup.enter.native="nextFocus5(row.xh-1)" placeholder="请输入实测值C"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueD" header-align="center" align="center" :required="true" label="实测值D" width="150"> <el-table-column prop="subDetailValueD" header-align="center" align="center" :required="true" label="实测值D" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueD" readonly placeholder="请输入实测值D"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueD" readonly placeholder="请输入实测值D"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `f`" v-model="templateTableData[row.xh-1].subDetailValueD" @keyup.enter.native="nextFocus6(row.xh-1)" placeholder="请输入实测值D"></el-input> <el-input v-else :ref="`${row.xh-1}` + `f`" v-model="templateTableData[row.xh-1].subDetailValueD" @keyup.enter.native="nextFocus6(row.xh-1)" placeholder="请输入实测值D"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="subDetailValueE" header-align="center" align="center" :required="true" label="实测值E" width="150"> <el-table-column prop="subDetailValueE" header-align="center" align="center" :required="true" label="实测值E" width="150">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-input v-if="templateTableData[row.xh-1].isSubmit === 'Y'" v-model="templateTableData[row.xh-1].subDetailValueE" readonly placeholder="请输入实测值E"></el-input>
<el-input v-if="isSubDetailReadonly(templateTableData[row.xh-1])" v-model="templateTableData[row.xh-1].subDetailValueE" readonly placeholder="请输入实测值E"></el-input>
<el-input v-else :ref="`${row.xh-1}` + `g`" v-model="templateTableData[row.xh-1].subDetailValueE" @keyup.enter.native="nextFocus7(row.xh-1)" placeholder="请输入实测值E"></el-input> <el-input v-else :ref="`${row.xh-1}` + `g`" v-model="templateTableData[row.xh-1].subDetailValueE" @keyup.enter.native="nextFocus7(row.xh-1)" placeholder="请输入实测值E"></el-input>
</template> </template>
</el-table-column> </el-table-column>
@ -738,7 +740,7 @@
</el-pagination> </el-pagination>
</div> </div>
<el-footer style="height:40px;margin-top: 10px;text-align:center"> <el-footer style="height:40px;margin-top: 10px;text-align:center">
<el-button v-if="detailData.submitFlag !== 'Y'" type="primary" @click="saveSubDetailResult">保存</el-button>
<el-button v-if="!isDetailReadonly" type="primary" @click="saveSubDetailResult">保存</el-button>
<el-button type="primary" @click="subDetailFlag = false">关闭</el-button> <el-button type="primary" @click="subDetailFlag = false">关闭</el-button>
</el-footer> </el-footer>
</el-dialog> </el-dialog>
@ -1017,6 +1019,15 @@
} }
return this.tableData.slice(start,end) return this.tableData.slice(start,end)
}, },
isDetailReadonly () {
return this.detailData.submitFlag === 'Y' && !this.exceptionModifyMode
},
isInspectionResultReadonly () {
return this.isDetailReadonly || this.exceptionModifyMode
},
isItemResultReadonly () {
return this.isDetailReadonly || this.exceptionModifyMode
},
// //
exportFields () { exportFields () {
let fields = {} let fields = {}
@ -1958,6 +1969,10 @@
authDetail: false, authDetail: false,
authFile: false, authFile: false,
authChange: false, authChange: false,
authExceptionModify: false,
exceptionModifyMode: false,
exceptionModifyInspectionResult: '',
exceptionModifyItemResultMap: {},
menuId: this.$route.meta.menuId, menuId: this.$route.meta.menuId,
roleList: [], roleList: [],
operatorList: [], operatorList: [],
@ -2785,6 +2800,7 @@
// //
saveDetailInformation (type) { saveDetailInformation (type) {
this.preserveExceptionLockedFields()
this.saveInformationData.site = this.detailData.site this.saveInformationData.site = this.detailData.site
this.saveInformationData.buNo = this.detailData.buNo this.saveInformationData.buNo = this.detailData.buNo
this.saveInformationData.inspectionNo = this.detailData.inspectionNo this.saveInformationData.inspectionNo = this.detailData.inspectionNo
@ -2803,7 +2819,7 @@
this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList)) this.saveInformationData.itemList = JSON.parse(JSON.stringify(this.detailList))
this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty this.saveInformationData.passQty = this.detailData.passQty == null ? 0 : this.detailData.passQty
this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty this.saveInformationData.notPassQty = this.detailData.notPassQty == null ? 0 : this.detailData.notPassQty
this.saveInformationData.type = type
this.saveInformationData.type = this.exceptionModifyMode ? '3' : type
this.transferLoadFlag = true this.transferLoadFlag = true
saveFQASDetailedRecord(this.saveInformationData).then(({data}) => { saveFQASDetailedRecord(this.saveInformationData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
@ -2831,6 +2847,36 @@
}) })
}, },
abnormalModifyModal (row) {
this.detailModal(row, true)
},
closeDetailDialog () {
this.exceptionModifyMode = false
this.exceptionModifyInspectionResult = ''
this.exceptionModifyItemResultMap = {}
},
preserveExceptionLockedFields () {
if (!this.exceptionModifyMode) {
return
}
this.detailData.inspectionResult = this.exceptionModifyInspectionResult
this.detailList.forEach(item => {
const originItemResult = this.exceptionModifyItemResultMap[item.itemNo]
if (originItemResult !== undefined) {
item.itemResult = originItemResult
}
})
},
isSubDetailReadonly (row) {
if (!row) {
return true
}
return row.isSubmit === 'Y' && !this.exceptionModifyMode
},
// //
actionModal (row) { actionModal (row) {
this.$confirm(`确认开始检验?`, '提示', { this.$confirm(`确认开始检验?`, '提示', {
@ -2868,7 +2914,10 @@
}, },
// //
detailModal (row) {
detailModal (row, exceptionModifyMode = false) {
this.exceptionModifyMode = exceptionModifyMode
this.exceptionModifyInspectionResult = ''
this.exceptionModifyItemResultMap = {}
this.detailData.site = row.site this.detailData.site = row.site
this.detailData.buNo = row.buNo this.detailData.buNo = row.buNo
this.detailData.inspectionNo = row.inspectionNo this.detailData.inspectionNo = row.inspectionNo
@ -2893,6 +2942,9 @@
this.detailData.responsiblePersonName = row.responsiblePersonName this.detailData.responsiblePersonName = row.responsiblePersonName
this.detailData.state = row.state this.detailData.state = row.state
this.detailData.spec = row.spec this.detailData.spec = row.spec
if (this.exceptionModifyMode) {
this.exceptionModifyInspectionResult = row.inspectionResult
}
if (row.state === '待检验') { if (row.state === '待检验') {
this.detailData.passQty = row.samplingQty this.detailData.passQty = row.samplingQty
} else { } else {
@ -2909,8 +2961,16 @@
fqasDetailSearch(this.detailData).then(({data}) => { fqasDetailSearch(this.detailData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.detailList = data.rows this.detailList = data.rows
if (this.exceptionModifyMode) {
let itemResultMap = {}
this.detailList.forEach(item => {
itemResultMap[item.itemNo] = item.itemResult
})
this.exceptionModifyItemResultMap = itemResultMap
}
} else { } else {
this.detailList = [] this.detailList = []
this.exceptionModifyItemResultMap = {}
} }
}) })
}, },
@ -3086,6 +3146,19 @@
// //
handleAddBtn (td) { handleAddBtn (td) {
if (this.exceptionModifyMode) {
let obj = {
subDetailValue: '',
samplingLocation: '',
samplingLocationB: '',
subDetailValueB: '',
subDetailValueC: '',
subDetailValueD: '',
subDetailValueE: '',
}
this.tableData.push(obj)
return
}
checkFQASIsSubmit(td).then(({data}) => { checkFQASIsSubmit(td).then(({data}) => {
if (data.flag !== 1) { if (data.flag !== 1) {
let obj = { let obj = {
@ -3106,6 +3179,10 @@
// //
batchHandleAdd (td) { batchHandleAdd (td) {
if (this.exceptionModifyMode) {
this.batchHandleAddModalFlag = true
return
}
checkFQASIsSubmit(td).then(({data}) => { checkFQASIsSubmit(td).then(({data}) => {
if (data.flag !== 1) { if (data.flag !== 1) {
this.batchHandleAddModalFlag = true this.batchHandleAddModalFlag = true
@ -3192,6 +3269,42 @@
// //
handleDeleteBtn (td) { handleDeleteBtn (td) {
if (this.exceptionModifyMode) {
if (this.checkedDetail.length === 0) {
this.$alert("请先选择要删除的数据", "提示", {
confirmButtonText: "确定",
})
} else {
this.$confirm("请是否确认删除该子明细记录?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
callback: (action) => {
if (action === "confirm") {
let val = this.checkedDetail
val.forEach((val, index) => {
this.tableData.splice(this.tableData.indexOf(val), 1)
if (this.templateTableData.length === 0) {
this.pageIndex2--
}
})
this.$message({
message: "删除成功!",
type: "success",
})
return
} else {
this.$message({
message: "已取消删除操作",
type: "warning",
})
return
}
},
})
}
return
}
checkFQASIsSubmit(td).then(({data}) => { checkFQASIsSubmit(td).then(({data}) => {
if (data.flag !== 1) { if (data.flag !== 1) {
if (this.checkedDetail.length === 0) { if (this.checkedDetail.length === 0) {
@ -3247,7 +3360,9 @@
saveFQASSubDetailed(this.subDetailData).then(({data}) => { saveFQASSubDetailed(this.subDetailData).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
if (data.count > 0) { if (data.count > 0) {
if (!this.exceptionModifyMode) {
this.subDetailData.itemResult = 'N' this.subDetailData.itemResult = 'N'
}
this.subDetailData.unqualifiedQuantity = data.count this.subDetailData.unqualifiedQuantity = data.count
} }
if (this.subDetailData.subDetailValues.length > 0) { if (this.subDetailData.subDetailValues.length > 0) {
@ -3255,8 +3370,10 @@
} else { } else {
this.subDetailData.subDetailRecordNum = -1 this.subDetailData.subDetailRecordNum = -1
this.subDetailData.unqualifiedQuantity = 0 this.subDetailData.unqualifiedQuantity = 0
if (!this.exceptionModifyMode) {
this.subDetailData.itemResult = 'Y' this.subDetailData.itemResult = 'Y'
} }
}
this.subDetailFlag = false this.subDetailFlag = false
this.tableData = [] this.tableData = []
this.$message({ this.$message({
@ -3431,7 +3548,7 @@
if (val[this.detailList[i].itemNo] != null) { if (val[this.detailList[i].itemNo] != null) {
this.detailList[i].subDetailRecordNum = 1 this.detailList[i].subDetailRecordNum = 1
} }
if (val[this.detailList[i].itemNo] > 0) {
if (!this.exceptionModifyMode && val[this.detailList[i].itemNo] > 0) {
this.detailList[i].itemResult = 'N' this.detailList[i].itemResult = 'N'
} }
} }
@ -3447,6 +3564,7 @@
let detailFlag = this.isAuth(this.menuId+":detail") let detailFlag = this.isAuth(this.menuId+":detail")
let fileFlag = this.isAuth(this.menuId+":file") let fileFlag = this.isAuth(this.menuId+":file")
let changeFlag = this.isAuth(this.menuId+":change") let changeFlag = this.isAuth(this.menuId+":change")
let exceptionModifyFlag = this.isAuth(this.menuId + ":exceptionModify")
// //
this.authSearch = !searchFlag this.authSearch = !searchFlag
this.authCheck = !checkFlag this.authCheck = !checkFlag
@ -3455,6 +3573,7 @@
this.authDetail = !detailFlag this.authDetail = !detailFlag
this.authFile = !fileFlag this.authFile = !fileFlag
this.authChange = !changeFlag this.authChange = !changeFlag
this.authExceptionModify = !exceptionModifyFlag
}, },
// ======================== OQC ======================== // ======================== OQC ========================

Loading…
Cancel
Save