过程检验检验结果二次确认逻辑

master
zhaoxiaolin 10 months ago
parent 5c65bf5a63
commit 19d0b4eb38

@ -171,3 +171,11 @@ export function getProductWorkOrder(query) {
params: query
});
}
// 查询巡检任务列表
export function getCkeckProjectXJList(query) {
return request({
url: '/quality/qcIncome/getCkeckProjectXJList',
method: 'get',
params: query
});
}

@ -53,3 +53,29 @@ export function getProduceReportXJ(orderNo) {
data: data
});
}
// 生产过程报告任务详情
export function getTaskInfo(data) {
return request({
url: '/quality/qcProduceReport/getTaskInfo',
method: 'post',
data: data
});
}
//提交确认
export function submitConfirm(recordId,orderNo,checkType,confirmRemark,confirm) {
const data = {
recordId,
orderNo,
checkType,
confirmRemark,
confirm
}
return request({
url: '/quality/qcProduceReport/submitConfirm',
method: 'post',
data: data
});
}

@ -0,0 +1,414 @@
<template>
<div>
<el-dialog title="检验报告确认"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
>
<el-tabs v-model="activeName0">
<el-tab-pane label="检验任务" name="first">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="8">
<el-form-item label="检验任务编号" prop="checkNo">
<el-input v-model="form.checkNo" placeholder="请输入检验任务编号" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="检验类型" prop="checkType" >
<el-select v-model="form.checkType" placeholder="请选择检验类型" style="width: 100%;" disabled>
<el-option
v-for="dict in checkTypes"
:key="dict.id"
:label="dict.checkName"
:value="dict.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="订单号" prop="orderNo">
<el-input v-model="form.orderNo" placeholder="请输入检验任务编号" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="物料号" prop="materialCode">
<el-input v-model="form.materialCode"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="生产数量" prop="quality">
<el-input type="number" v-model="form.quality" placeholder="请输入生产数量" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="生产时间" prop="incomeTime">
<el-date-picker clearable
v-model="form.incomeTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择生产时间" disabled>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位" prop="unit" >
<el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;">
<el-option
v-for="dict in dict.type.unit"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="批次号" prop="incomeBatchNo">
<el-input v-model="form.ordincomeBatchNoerNo" placeholder="请输入检验任务编号"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="抽样数量" prop="sampleQuality">
<el-input type="number" v-model="form.sampleQuality" placeholder="请输入抽样数量" disabled/>
</el-form-item>
</el-col>
<el-col :span="6" v-for="(item,index) in defects" :key="index">
<el-form-item :label="item.defectSubclass" prop="">
<el-input type="number" v-model="item.noOkQuality" placeholder="请输入不合格数量" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="车间名称" prop="supplierName" >
<el-input v-model="form.supplierName" placeholder="请输入所属车间名称" disabled>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="车间编码" prop="supplierCode">
<el-input v-model="form.supplierCode" placeholder="请输入所属车间编码" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="检测人姓名" prop="checkManName">
<el-input v-model="form.checkManName" placeholder="请选择检测人姓名">
</el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="检测人工号" prop="checkManCode" >
<el-input v-model="form.checkManCode" placeholder="请输入检测人工号"/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="检测地点" prop="checkLoc">
<el-input v-model="form.checkLoc" placeholder="请输入检测地点" disabled/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="检测结果" prop="checkResult">
<el-input v-model="form.checkResult"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="检验原因" prop="reason">
<el-input v-model="form.reason" placeholder="请选择检验原因" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="生产类型" prop="productType" >
<el-input v-model="form.productType" placeholder="请输入生产类型" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<el-col :span="5">
<el-form-item label="确认人" prop="confirmManName">
<el-input v-model="form.confirmManName" disabled>
</el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="确认人工号" prop="confirmManCode" >
<el-input v-model="form.confirmManCode" disabled/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="确认" prop="confirm" >
<el-radio v-model="form.confirm" label="1">YES</el-radio>
<el-radio v-model="form.confirm" label="0">NO</el-radio>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="确认时间" prop="confirmTime" >
<el-input v-model="form.confirmTime" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="确认意见" prop="confirmRemark">
<el-input type="textarea" v-model="form.confirmRemark" placeholder="请输入确认意见" />
</el-form-item>
</el-col>
</el-row>
<el-form-item style="aling:right">
<el-button type="primary" @click="submitConfirmFunc" v-show="form.confirmTime == null && form.myself"> </el-button>
<el-button @click="cancelForm"> </el-button>
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane label="检测项明细" name="second">
<el-table v-loading="loading" :data="itemList" ref="myTable" >
<el-table-column width="50" align="center" type="selection">
</el-table-column>
<!-- 序号 -->
<el-table-column label="检测规则Id" align="left" prop="recordId" v-if="false"/>
<el-table-column label="检测规则编码" align="left" prop="projectNo" width="120"/>
<el-table-column label="检验规则名称" align="left" prop="ruleName" width="300"/>
<el-table-column label="检验规则属性" align="left" prop="propertyCode" width="120" >
<template slot-scope="scope">
<dict-tag
:options="dict.type.qc_rule_prop"
:value="scope.row.propertyCode"
/>
</template>
</el-table-column>
<el-table-column label="测量值" align="left" prop="actualValue" width="120"/>
<el-table-column label="检测结果" key="status" align="center" prop="status" width="90"/>
<el-table-column label="不良描述" align="left" prop="remark" width="120"/>
<el-table-column label="附件" align="center" prop="files" width="200">
<template slot-scope="scope">
<el-image v-for="(item,index) in scope.row.files"
:src="item.fileAddress"
style="width: 100px; height: 100px"
:preview-src-list="scope.row.fileUrls"
:fit="fit" />
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-tab-pane>
</el-tabs>
</el-dialog>
</div>
</template>
<script>
import { getCkeckProjectList} from "@/api/quality/income";
import { getCheckTypes} from "@/api/quality/qcProduce";
import { getTaskInfo,submitConfirm} from "@/api/quality/produceReport";
import { getDefectTypeListByDefectType } from "@/api/quality/defectType";
import { } from "@/api/quality/produceReport";
export default {
name: "itemSelectUser",
dicts: ["check_result","qc_rule_prop","unit"],
data() {
return {
viewStatus : '0',
showFlag : false,
//
selectedRows: {},
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// BOM
itemList: null,
checkTypes:[],
defects:[],
//
bomCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
belongTo:''
//,userCode: '',
//userName : ''
},
data:{},
dynamicValidateForm: {
domains: [{
value: ''
}]
},
//
valueOpen: false,
//id
recordId:'',
typeCode:'',//
defectList:[],//
activeName0: 'first',
//
form: {},
rules: {
confirmRemark:[
{ required: true, message: "确认意见不能为空", trigger: "blur" }
],
confirm:[
{ required: true, message: "确认不能为空", trigger: "blur" }
]
}
};
},
created() {
this.handleDefectType();
this.getCheckTypes();
},
methods: {
init(rowdata){
this.data=rowdata;
this.queryParams.belongTo = this.data.recordId;
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
this.getTaskInfoFunc();
this.getList();
},
//
getCheckTypes() {
getCheckTypes('produce').then(response => {
this.checkTypes = response;
});
},
handleDefectType() {
const defectType = "produce";
getDefectTypeListByDefectType(defectType).then(response => {
this.defects = response.rows;
});
},
/** 查询任务表单*/
getTaskInfoFunc() {
this.reset();
getTaskInfo(this.data).then(data => {
this.form = data;
});
},
/** 查询表格列表*/
getList() {
this.loading = true;
getCkeckProjectList(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
//
submitConfirmFunc() {
let confirmVal = 1;
if(this.form.confirm != null){
confirmVal = this.form.confirm;
}
submitConfirm(
this.data.recordId,
this.data.orderNo,
this.data.checkType,
this.form.confirmRemark,
confirmVal
).then(response => {
this.$modal.msgSuccess("检测完成");
this.$emit('saveCheck');
this.showFlag = false;
});
},
//
cancelForm() {
this.showFlag = false;
},
//
reset() {
this.form = {
recordId: null,
checkNo: null,
incomeBatchNo: null,
orderNo: null,
materialCode: null,
materialName: null,
quality: null,
unit: null,
supplierCode: null,
supplierName: null,
incomeTime: null,
checkLoc: null,
checkStatus: null,
checkManCode: null,
checkManName: null,
checkTime: null,
checkResult: null,
status: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
factoryCode: null,
delFlag: null,
//defects: [],
confirmManCode:null,
confirmManName:null,
confirmRemark:null
};
this.resetForm("form");
}
}
};
</script>
<style>
.el-dialog__body {
padding: 2px 20px;
}
</style>

@ -0,0 +1,396 @@
<template>
<div>
<el-dialog title="检验报告确认"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
>
<el-tabs v-model="activeName0">
<el-tab-pane label="检验任务" name="first">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="8">
<el-form-item label="检验类型" prop="checkType" >
<el-select v-model="form.checkType" placeholder="请选择检验类型" style="width: 100%;" disabled>
<el-option
v-for="dict in checkTypes"
:key="dict.id"
:label="dict.checkName"
:value="dict.id"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="订单号" prop="orderNo">
<el-input v-model="form.orderNo" placeholder="请输入检验任务编号" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="生产时间" prop="incomeTime">
<el-date-picker clearable
v-model="form.incomeTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择生产时间" disabled>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="物料名称" prop="materialName">
<el-input v-model="form.materialName"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="物料号" prop="materialCode">
<el-input v-model="form.materialCode"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="生产数量" prop="quality">
<el-input type="number" v-model="form.quality" placeholder="请输入生产数量" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="单位" prop="unit" >
<el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;">
<el-option
v-for="dict in dict.type.unit"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="车间名称" prop="supplierName" >
<el-input v-model="form.supplierName" placeholder="请输入所属车间名称" disabled>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="车间编码" prop="supplierCode">
<el-input v-model="form.supplierCode" placeholder="请输入所属车间编码" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item label="检验原因" prop="reason">
<el-input v-model="form.reason" placeholder="请选择检验原因" disabled/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="生产类型" prop="productType" >
<el-input v-model="form.productType" placeholder="请输入生产类型" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-divider></el-divider>
<el-row>
<el-col :span="5">
<el-form-item label="确认人" prop="confirmManName">
<el-input v-model="form.confirmManName" disabled>
</el-input>
</el-form-item>
</el-col>
<el-col :span="5">
<el-form-item label="确认人工号" prop="confirmManCode" >
<el-input v-model="form.confirmManCode" disabled/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="确认" prop="confirm" >
<el-radio v-model="form.confirm" label="1">YES</el-radio>
<el-radio v-model="form.confirm" label="0">NO</el-radio>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="确认时间" prop="confirmTime" >
<el-input v-model="form.confirmTime" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="确认意见" prop="confirmRemark">
<el-input type="textarea" v-model="form.confirmRemark" placeholder="请输入确认意见" />
</el-form-item>
</el-col>
</el-row>
<el-form-item style="aling:right">
<el-button type="primary" @click="submitConfirmFunc" v-show="form.confirmTime == null && form.myself"> </el-button>
<el-button @click="cancelForm"> </el-button>
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane label="检测记录明细" name="second">
<el-table v-loading="loading" :data="itemList" ref="myTable" >
<el-table-column type="expand">
<template #default="props">
<el-table :data="props.row.qcCheckTaskDetails" stripe border style="width: 90%">
<!-- 序号 -->
<el-table-column label="序号" type="index" width="50" align="center">
<template scope="scope">
<span>{{(queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1}}</span>
</template>
</el-table-column>
<el-table-column label="检验规则名称" align="left" prop="ruleName" width="300"/>
<el-table-column label="检验规则属性" align="left" prop="propertyCode" width="120" >
<template slot-scope="scope">
<dict-tag
:options="dict.type.qc_rule_prop"
:value="scope.row.propertyCode"
/>
</template>
</el-table-column>
<el-table-column label="测量值" align="left" prop="actualValue" width="120"/>
<el-table-column label="检测结果" key="status" align="center" prop="status" width="90"/>
<el-table-column label="不良描述" align="left" prop="remark" width="120"/>
<el-table-column label="附件" align="center" prop="files" width="200">
<template slot-scope="scope">
<el-image v-for="(item,index) in scope.row.files"
:src="item.fileAddress"
style="width: 100px; height: 100px"
:preview-src-list="scope.row.fileUrls"
:fit="fit" />
</template>
</el-table-column>
</el-table>
</template>
</el-table-column>
<el-table-column label="检验任务编号" align="center" prop="checkNo" width="120"/>
<el-table-column label="检测地点" align="center" prop="checkLoc" width="120"/>
<el-table-column label="检测状态" align="center" prop="checkStatus" >
<template slot-scope="scope">
<dict-tag
:options="dict.type.check_status"
:value="scope.row.checkStatus"
/>
</template>
</el-table-column>
<el-table-column label="检测人工号" align="center" prop="checkManCode" width="100"/>
<el-table-column label="检测人姓名" align="center" prop="checkManName" width="100"/>
<el-table-column label="抽样数量" align="center" prop="sampleQuality" width="100"/>
<el-table-column label="不合格分类" align="center" prop="noOkQualityNames" width="200"/>
<el-table-column label="不合格数量" align="center" prop="noOkQualityVals" width="200"/>
<el-table-column label="检验时间" align="center" prop="checkTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="检验结果" align="center" prop="checkResult" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-tab-pane>
</el-tabs>
</el-dialog>
</div>
</template>
<script>
import { getCkeckProjectXJList} from "@/api/quality/income";
import { getCheckTypes} from "@/api/quality/qcProduce";
import { getTaskInfo,submitConfirm} from "@/api/quality/produceReport";
import { getDefectTypeListByDefectType } from "@/api/quality/defectType";
import { } from "@/api/quality/produceReport";
export default {
name: "itemSelectUser",
dicts: ["check_result","qc_rule_prop","unit","check_status"],
data() {
return {
viewStatus : '0',
showFlag : false,
//
selectedRows: {},
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// BOM
itemList: null,
checkTypes:[],
defects:[],
//
bomCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
belongTo:''
//,userCode: '',
//userName : ''
},
data:{},
dynamicValidateForm: {
domains: [{
value: ''
}]
},
//
valueOpen: false,
//id
recordId:'',
typeCode:'',//
defectList:[],//
activeName0: 'first',
//
form: {},
rules: {
confirmRemark:[
{ required: true, message: "确认意见不能为空", trigger: "blur" }
],
confirm:[
{ required: true, message: "确认不能为空", trigger: "blur" }
]
}
};
},
created() {
//this.handleDefectType();
this.getCheckTypes();
},
methods: {
init(rowdata){
debugger
this.data=rowdata;
this.queryParams.orderNo = this.data.orderNo;
this.queryParams.pageNum = 1;
this.queryParams.pageSize = 10;
this.getTaskInfoFunc();
this.getList();
},
//
getCheckTypes() {
getCheckTypes('produce').then(response => {
this.checkTypes = response;
});
},
/**
handleDefectType() {
const defectType = "produce";
getDefectTypeListByDefectType(defectType).then(response => {
this.defects = response.rows;
});
},
**/
/** 查询任务表单*/
getTaskInfoFunc() {
this.reset();
getTaskInfo(this.data).then(data => {
this.form = data;
});
},
/** 查询表格列表*/
getList() {
this.loading = true;
getCkeckProjectXJList(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
//
submitConfirmFunc() {
let confirmVal = 1;
if(this.form.confirm != null){
confirmVal = this.form.confirm;
}
submitConfirm(
null,
this.data.orderNo,
this.data.checkType,
this.form.confirmRemark,
confirmVal
).then(response => {
this.$modal.msgSuccess("检测完成");
this.$emit('saveCheck');
this.showFlag = false;
});
},
//
cancelForm() {
this.showFlag = false;
},
//
reset() {
this.form = {
recordId: null,
checkNo: null,
incomeBatchNo: null,
orderNo: null,
materialCode: null,
materialName: null,
quality: null,
unit: null,
supplierCode: null,
supplierName: null,
incomeTime: null,
checkLoc: null,
checkStatus: null,
checkManCode: null,
checkManName: null,
checkTime: null,
checkResult: null,
status: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
factoryCode: null,
delFlag: null,
//defects: [],
confirmManCode:null,
confirmManName:null,
confirmRemark:null
};
this.resetForm("form");
}
}
};
</script>
<style>
.el-dialog__body {
padding: 2px 20px;
}
</style>

@ -11,6 +11,14 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="检验任务" prop="checkNo">
<el-input
v-model="queryParams.checkNo"
placeholder="请输入检测地点"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物料编码" prop="materialCode">
<el-input
v-model="queryParams.materialCode"
@ -68,16 +76,27 @@
v-hasPermi="['quality:produceReport:export']"
>导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleConfirm"
v-hasPermi="['quality:produceReport:confirm']"
>检验确认</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="incomeList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="recordId" align="center" prop="recordId" v-if="false"/>
<el-table-column label="任务日期" align="center" prop="createTimeStr" width="100"/>
<el-table-column label="检验任务编号" align="center" prop="checkNo" width="120"/>
<el-table-column label="订单号" align="center" prop="orderNo" width="150"/>
<el-table-column label="物料名称" align="center" prop="materialName" width="150"/>
<el-table-column label="任务日期" align="center" prop="createTimeStr" width="100" fixed/>
<el-table-column label="检验任务编号" align="center" prop="checkNo" width="120" fixed/>
<el-table-column label="订单号" align="center" prop="orderNo" width="150" fixed/>
<el-table-column label="物料名称" align="center" prop="materialName" width="200" fixed :show-overflow-tooltip="true"/>
<el-table-column label="收货数量" align="center" prop="quality" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="产线名称" align="center" prop="supplierName" width="120"/>
@ -92,6 +111,12 @@
<dict-tag :options="dict.type.check_result" :value="scope.row.checkResult"/>
</template>
</el-table-column>
<el-table-column label="结果确认" align="center" width="100">
<template slot-scope="scope">
<dict-tag :options="dict.type.device_yes_no" :value="parseInt(scope.row.confirm)"/>
</template>
</el-table-column>
<el-table-column label="确认人" align="center" prop="confirmManName" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -169,22 +194,168 @@
<el-table-column label="序号" type="index" align="center" :index="indexMethod"/>
<el-table-column label="项目名称" width="155" align="left" prop="ruleName" />
<el-table-column label="上午" align="center" >
<el-table-column prop="column080090" label="8:00-9:00" width="80" align="center"/>
<el-table-column prop="column090100" label="9:00-10:00" width="95" align="center"/>
<el-table-column prop="column100110" label="10:00-11:00" width="95" align="center"/>
<el-table-column prop="column110120" label="11:00-12:00" width="95" align="center"/>
<el-table-column prop="column080090" label="8:00-9:00" width="80" align="center">
<template slot-scope="scope" >
<div v-for="(item,index) in scope.row.column080090.split(',')">
<el-image
:src="item"
style="width: 60px; height: 60px"
:fit="fit"
:preview-src-list="Array.from(scope.row.column080090.split(',')).slice(1)"
v-if="index>0"/>
<span v-else>{{item}}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="column090100" label="9:00-10:00" width="95" align="center">
<template slot-scope="scope" >
<div v-for="(item,index) in scope.row.column090100.split(',')">
<el-image
:src="item"
style="width: 60px; height: 60px"
:fit="fit"
:preview-src-list="Array.from(scope.row.column090100.split(',')).slice(1)"
v-if="index>0"/>
<span v-else>{{item}}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="column100110" label="10:00-11:00" width="95" align="center">
<template slot-scope="scope" >
<div v-for="(item,index) in scope.row.column100110.split(',')">
<el-image
:src="item"
style="width: 60px; height: 60px"
:fit="fit"
:preview-src-list="Array.from(scope.row.column100110.split(',')).slice(1)"
v-if="index>0"/>
<span v-else>{{item}}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="column110120" label="11:00-12:00" width="95" align="center">
<template slot-scope="scope" >
<div v-for="(item,index) in scope.row.column110120.split(',')">
<el-image
:src="item"
style="width: 60px; height: 60px"
:fit="fit"
:preview-src-list="Array.from(scope.row.column110120.split(',')).slice(1)"
v-if="index>0"/>
<span v-else>{{item}}</span>
</div>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="下午" align="center" >
<el-table-column prop="column133143" label="13:30-14:30" width="95" align="center"/>
<el-table-column prop="column143153" label="14:30-15:30" width="95" align="center"/>
<el-table-column prop="column153163" label="15:30-16:30" width="95" align="center"/>
<el-table-column prop="column163173" label="16:30-17:30" width="95" align="center"/>
<el-table-column prop="column133143" label="13:30-14:30" width="95" align="center">
<template slot-scope="scope" >
<div v-for="(item,index) in scope.row.column133143.split(',')">
<el-image
:src="item"
style="width: 60px; height: 60px"
:fit="fit"
:preview-src-list="Array.from(scope.row.column133143.split(',')).slice(1)"
v-if="index>0"/>
<span v-else>{{item}}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="column143153" label="14:30-15:30" width="95" align="center">
<template slot-scope="scope" >
<div v-for="(item,index) in scope.row.column143153.split(',')">
<el-image
:src="item"
style="width: 60px; height: 60px"
:fit="fit"
:preview-src-list="Array.from(scope.row.column143153.split(',')).slice(1)"
v-if="index>0"/>
<span v-else>{{item}}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="column153163" label="15:30-16:30" width="95" align="center">
<template slot-scope="scope" >
<div v-for="(item,index) in scope.row.column153163.split(',')">
<el-image
:src="item"
style="width: 60px; height: 60px"
:fit="fit"
:preview-src-list="Array.from(scope.row.column153163.split(',')).slice(1)"
v-if="index>0"/>
<span v-else>{{item}}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="column163173" label="16:30-17:30" width="95" align="center">
<template slot-scope="scope" >
<div v-for="(item,index) in scope.row.column163173.split(',')">
<el-image
:src="item"
style="width: 60px; height: 60px"
:fit="fit"
:preview-src-list="Array.from(scope.row.column163173.split(',')).slice(1)"
v-if="index>0"/>
<span v-else>{{item}}</span>
</div>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="加班" align="center" >
<el-table-column prop="column123133" label="12:30-13:30" width="95" align="center"/>
<el-table-column prop="column180190" label="18:00-19:00" width="95" align="center"/>
<el-table-column prop="column190200" label="19:00-20:00" width="95" align="center"/>
<el-table-column prop="column200210" label="20:00-21:00" width="95" align="center"/>
<el-table-column prop="column123133" label="12:30-13:30" width="95" align="center">
<template slot-scope="scope" >
<div v-for="(item,index) in scope.row.column123133.split(',')">
<el-image
:src="item"
style="width: 60px; height: 60px"
:fit="fit"
:preview-src-list="Array.from(scope.row.column123133.split(',')).slice(1)"
v-if="index>0"/>
<span v-else>{{item}}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="column180190" label="18:00-19:00" width="95" align="center">
<template slot-scope="scope" >
<div v-for="(item,index) in scope.row.column180190.split(',')">
<el-image
:src="item"
style="width: 60px; height: 60px"
:fit="fit"
:preview-src-list="Array.from(scope.row.column180190.split(',')).slice(1)"
v-if="index>0"/>
<span v-else>{{item}}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="column190200" label="19:00-20:00" width="95" align="center">
<template slot-scope="scope" >
<div v-for="(item,index) in scope.row.column190200.split(',')">
<el-image
:src="item"
style="width: 60px; height: 60px"
:fit="fit"
:preview-src-list="Array.from(scope.row.column190200.split(',')).slice(1)"
v-if="index>0"/>
<span v-else>{{item}}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="column200210" label="20:00-21:00" width="95" align="center">
<template slot-scope="scope" >
<div v-for="(item,index) in scope.row.column200210.split(',')">
<el-image
:src="item"
style="width: 60px; height: 60px"
:fit="fit"
:preview-src-list="Array.from(scope.row.column200210.split(',')).slice(1)"
v-if="index>0"/>
<span v-else>{{item}}</span>
</div>
</template>
</el-table-column>
</el-table-column>
</el-table>
@ -260,8 +431,15 @@
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item label="生产类型" >
<el-input v-model="form.productType" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="首检原因" >
<el-input disabled/>
<el-input v-model="form.reason" disabled/>
</el-form-item>
</el-col>
</el-row>
@ -332,6 +510,10 @@
<el-button type="primary" @click="handleDone"> </el-button>
</div>
</el-dialog>
<!--检验项目确认弹窗首检-->
<ItemCheckProjects ref="itemCheckProjects"></ItemCheckProjects>
<!--检验项目确认弹窗巡检-->
<ItemCheckProjectsXJ ref="itemCheckProjectsXJ"></ItemCheckProjectsXJ>
</div>
</template>
@ -339,16 +521,20 @@
import { listProduce, getProduce, delProduce, addProduce, updateIncome,getProduceReportXJ} from "@/api/quality/produceReport";
import { getCkeckProjectList} from "@/api/quality/incomeReport";
import { getCheckTypes } from "@/api/quality/qcProduce";
import ItemCheckProjects from "./ItemCheckProjects.vue";
import ItemCheckProjectsXJ from "./ItemCheckProjectsXJ.vue";
import moment from 'moment';
export default {
name: "Income",
dicts: ["unit","check_status","check_result","qc_rule_prop"],
components: {ItemCheckProjects,ItemCheckProjectsXJ},
dicts: ["unit","check_status","check_result","qc_rule_prop","device_yes_no"],
data() {
return {
//
loading: true,
//
ids: [],
selectRow:{},
//
single: true,
//
@ -437,7 +623,14 @@ export default {
this.getCheckTypes();
},
methods: {
//
checkStatusFormate(row, column, cellValue){
if(cellValue == 'Y'){
return '✓'
}else if(cellValue == 'N'){
return '✘'
}
},
//
checkStatusFormate(row, column, cellValue){
if(cellValue == 'Y'){
@ -477,9 +670,12 @@ export default {
getList() {
this.loading = true;
if(this.queryParams.checkTimeArray.length>0){
if(this.queryParams.checkTimeArray!=null && this.queryParams.checkTimeArray.length>0){
this.queryParams.checkTimeStart = moment(this.queryParams.checkTimeArray[0]).format('YYYY-MM-DD HH:mm:ss');
this.queryParams.checkTimeEnd = moment(this.queryParams.checkTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
}else{
this.queryParams.checkTimeStart = null;
this.queryParams.checkTimeEnd = null;
}
listProduce(this.queryParams).then(response => {
@ -540,6 +736,7 @@ export default {
},
//
handleSelectionChange(selection) {
this.selectRow = selection
this.ids = selection.map(item => item.recordId)
this.single = selection.length!==1
this.multiple = !selection.length
@ -647,6 +844,17 @@ export default {
this.firstReportOpen = false;
this.reset();
},
/** 检验报告确认操作 */
handleConfirm(row) {
if(this.selectRow[0].checkType == 'checkTypeSC'){
this.$refs.itemCheckProjects.showFlag = true;
this.$refs.itemCheckProjects.init(this.selectRow[0]);
}else if(this.selectRow[0].checkType == 'checkTypeSCXJ'){
this.$refs.itemCheckProjectsXJ.showFlag = true;
this.$refs.itemCheckProjectsXJ.init(this.selectRow[0]);
}
},
}
};
</script>

@ -4,7 +4,7 @@
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
width="1400px"
>
<el-row :gutter="20">

@ -60,7 +60,20 @@
/>
</el-form-item>
<el-form-item label="检验结果" prop="checkResult">
<el-select
v-model="queryParams.checkResult"
placeholder="检验结果"
clearable
>
<el-option
v-for="dict in dict.type.check_result"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="生产时间" prop="incomeTimeArray">
<el-date-picker
v-model="queryParams.incomeTimeArray"
@ -99,20 +112,6 @@
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="检验结果" prop="checkResult">
<el-select
v-model="queryParams.checkResult"
placeholder="检验结果"
clearable
>
<el-option
v-for="dict in dict.type.check_result"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -218,16 +217,6 @@
</template>
</el-table-column>
<el-table-column label="检验结果" align="center" prop="checkResult" />
<el-table-column label="是否启用" align="center" width="100" v-if="false">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
active-value="1"
inactive-value="0"
@change="handleStatusChange(scope.row)"
></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -392,6 +381,34 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="生产类型" prop="productType" >
<el-input v-model="form.productType" placeholder="请输入生产类型"/>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="确认人姓名" prop="confirmManName">
<el-input v-model="form.confirmManName" placeholder="请选择确认人姓名">
<el-button slot="append" @click="handleSelectConfirmUser" icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="确认人工号" prop="confirmManCode" >
<el-input v-model="form.confirmManCode" placeholder="请输入确认人工号" disabled/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="检验原因" prop="reason">
<el-input v-model="form.reason" placeholder="请选择检验原因"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -418,6 +435,11 @@
ref="itemSelectProject"
@saveCheck="saveCheck"
></ItemSelectProject>
<!--确认人员选择弹窗-->
<ItemSelectConfirmUser
ref="itemSelectConfirmUser"
@onSelected="onSelectConfirmUser"
></ItemSelectConfirmUser>
</div>
</template>
@ -429,11 +451,12 @@ import moment from 'moment';
import ItemSelectWorkOrder from "./selectWorkOrder.vue";
import ItemSelectWorkCenter from "./selectWorkCenter";
import ItemSelectUser from "../qcIncome/selectUser.vue";
import ItemSelectConfirmUser from "./selectUser.vue";
import ItemSelectProject from "../qcIncome/checkProjectType.vue";
import { getDefectTypeListByDefectType } from "@/api/quality/defectType.js";
export default {
name: "QcProduce",
components: { ItemSelectWorkCenter,ItemSelectUser,ItemSelectProject,ItemSelectWorkOrder},
components: { ItemSelectWorkCenter,ItemSelectUser,ItemSelectProject,ItemSelectWorkOrder,ItemSelectConfirmUser},
dicts: ["unit","check_status","check_result"],
data() {
return {
@ -577,6 +600,9 @@ export default {
if(this.queryParams.checkTimeArray != null &&this.queryParams.checkTimeArray.length>0){
this.queryParams.checkTimeStart = moment(this.queryParams.checkTimeArray[0]).format('YYYY-MM-DD HH:mm:ss');
this.queryParams.checkTimeEnd = moment(this.queryParams.checkTimeArray[1]).format('YYYY-MM-DD HH:mm:ss');
}else{
this.queryParams.checkTimeStart = null;
this.queryParams.checkTimeEnd = null;
}
listQcProduce(this.queryParams).then(response => {
@ -608,6 +634,8 @@ export default {
checkStatus: null,
checkManCode: null,
checkManName: null,
confirmManCode: null,
confirmManName: null,
checkTime: null,
checkResult: null,
status: null,
@ -749,6 +777,15 @@ export default {
this.form.checkManCode = obj.code;
this.form.checkManName = obj.name;
},
/**确认人员选择弹出框**/
handleSelectConfirmUser() {
this.$refs.itemSelectConfirmUser.showFlag = true;
},
//
onSelectConfirmUser(obj) {
this.form.confirmManCode = obj.code;
this.form.confirmManName = obj.name;
},
//
handleCheckProject(row){
if(row.checkStatus != '0'){

@ -0,0 +1,150 @@
<template>
<el-dialog title="人员选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
>
<el-row :gutter="20">
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="center">
<el-form-item label="员工工号">
<el-input
v-model="queryParams.userCode"
placeholder="员工工号"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="员工姓名">
<el-input
v-model="queryParams.userName"
placeholder="员工姓名"
clearable
style="width: 240px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection">
</el-table-column>
<!-- 序号 -->
<el-table-column label="员工ID" align="left" key="userId" prop="userId" :show-overflow-tooltip="true" />
<el-table-column label="员工工号" align="left" key="userCode" prop="userCode" :show-overflow-tooltip="true" />
<el-table-column label="员工姓名" align="left" key="userName" prop="userName" :show-overflow-tooltip="true" />
<el-table-column label="手机号" align="left" key="phonenumber" prop="phonenumber" :show-overflow-tooltip="true" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitBomForm"> </el-button>
<el-button @click="showFlag=false"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getQcListUser } from "@/api/quality/income";
export default {
name: "itemSelectUser",
data() {
return {
showFlag:false,
//
selectedRows: {},
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
// BOM
itemList: null,
//
bomCode: undefined,
defaultProps: {
id: "id",
label: "label"
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
userCode: '',
userName : ''
}
};
},
created() {
this.getList();
},
methods: {
/** 查询表格列表*/
getList() {
this.loading = true;
getQcListUser(this.queryParams).then(response => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
}
);
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleBomSelectionChange(selection) {
/* if(selection.length>1){
this.$modal.msgSuccess("只能选一个");
} */
/* this.ids = selection[0].userCode;
this.idsName = selection[0].userName; */
this.ids = selection.map(item => item.userCode).join(',');
this.idsName = selection.map(item => item.userName).join(',');
},
submitBomForm() {
this.selectedRows.code = this.ids;
this.selectedRows.name = this.idsName;
this.$emit('onSelected', this.selectedRows);
this.showFlag = false;
this.queryParams.itemCodeGet = "";
}
}
};
</script>
Loading…
Cancel
Save