Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop

This commit is contained in:
caoqianming 2022-03-30 13:51:14 +08:00
commit 0b395b98cd
5 changed files with 143 additions and 36 deletions

View File

@ -2,6 +2,6 @@
ENV = 'production' ENV = 'production'
# base api # base api
VUE_APP_BASE_API = 'http://49.232.14.174:2222/api' VUE_APP_BASE_API = 'http://192.168.1.250/api'
#VUE_APP_BASE_API = 'http://127.0.0.1:8000/api' #VUE_APP_BASE_API = 'http://127.0.0.1:8000/api'

View File

@ -215,12 +215,19 @@
</div> </div>
</el-row> </el-row>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="limitedPhoto" @close="closeCamera" id="loginFaceWrap"> <el-dialog :visible.sync="limitedPhoto" @close="closeCamera" id="loginFaceWrap">
<div style="font-size: 28px;color: #333333;text-align: center;font-weight: bold;">审核人员确认</div> <div style="font-size: 28px;color: #333333;text-align: center;font-weight: bold;">审核人员确认</div>
<div class="testTracking"> <div class="testTracking">
<faceLogin v-if="limitedPhoto" ref="faceTracking" name="faceLogin" @func="getMsgFormSon"></faceLogin> <faceLogin v-if="limitedPhoto" ref="faceTracking" name="faceLogin" @func="getMsgFormSon"></faceLogin>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="limitedUserCheck" @close="closeCamera" id="userCheckWrap">
<div style="font-size: 28px;color: #333333;text-align: center;font-weight: bold;">审核人员确认</div>
<div class="testTracking">
<faceLogin v-if="limitedUserCheck" ref="faceTracking" name="userCheck" @func="checkSubmit"></faceLogin>
</div>
</el-dialog>
</div> </div>
</template> </template>
@ -256,6 +263,11 @@
enabled:true, enabled:true,
material:null material:null
}, },
checkParams:{
id:null,
is_testok:true,
record_data:null,
},
planId:null, planId:null,
leader:null, leader:null,
recordId: null, recordId: null,
@ -272,6 +284,7 @@
reviewVisible:false, reviewVisible:false,
recordVisible:false, recordVisible:false,
is_midtesting:false, is_midtesting:false,
limitedUserCheck:false,
is_testok:false, is_testok:false,
formName:'首件确认检查表', formName:'首件确认检查表',
update_time:'', update_time:'',
@ -445,27 +458,45 @@
}); });
}, },
//提交首件检查 //提交首件检查:需要人脸识别进行身份验证
recordSubmit(value) { recordSubmit(value) {
let that = this; let that = this;
let id = value.id;
let params = {}; let params = {};
params.record_data = value.record_data; params.id = value.id;
params.is_testok = value.is_testok; params.is_testok = value.is_testok;
putTestRecordItem(id, params).then((res) => { params.record_data = value.record_data;
if (res.code >= 200) { that.checkParams = params;
subTestRecordItem(id, params).then((res) => { that.limitedUserCheck = true;
if (res.code >= 200) { },
that.recordVisible = false; checkSubmit(data){
that.getTableData(); let that =this;
} let id = that.checkParams.id;
}); let params = new Object();
} else { params.is_testok = that.checkParams.is_testok;
that.$message.error(res.msg) params.record_data = that.checkParams.record_data;
} params.token = data.token;
}).catch((err) => { if(data.token!==''&&data.token!==null&&data.token!==undefined) {
that.$message.error(err); putTestRecordItem(id, params).then((res) => {
}); if (res.code >= 200) {
subTestRecordItem(id, params).then((res) => {
debugger;
that.limitedUserCheck = false;
if (res.code >= 200) {
that.recordVisible = false;
that.getTableData();
}else{
that.$message.error(res.msg)
}
}).catch(()=>{
that.limitedUserCheck = false;
});
} else {
that.$message.error(res.msg)
}
}).catch((err) => {
that.$message.error(err);
});
}
}, },
//再次点击首件检验 //再次点击首件检验

View File

@ -76,7 +76,6 @@
检验记录 检验记录
</el-link> </el-link>
<el-link <el-link
v-if="checkPermission(['wp_scrap'])"
type="danger" type="danger"
@click="handleScrapbcp(scope)" @click="handleScrapbcp(scope)"
> >
@ -267,7 +266,10 @@
<template slot-scope="scope">{{ scope.row.step_.name }}</template> <template slot-scope="scope">{{ scope.row.step_.name }}</template>
</el-table-column> </el-table-column>
<el-table-column label="检验员"> <el-table-column label="检验员">
<!--<template slot-scope="scope">{{}}</template>--> <!--<template slot-scope="scope">
<span v-if="scope.row.update_by_!==null">{{scope.row.update_by_.username}}</span>
<span v-else>{{scope.row.create_by_.username}}</span>
</template>-->
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" width="220px"> <el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope"> <template slot-scope="scope">
@ -360,19 +362,22 @@
<template slot-scope="scope">{{ scope.row.subproduction_plan_.number }}</template> <template slot-scope="scope">{{ scope.row.subproduction_plan_.number }}</template>
</el-table-column> </el-table-column>
<el-table-column label="检验员"> <el-table-column label="检验员">
<!--<template slot-scope="scope">{{}}</template>--> <!--<template slot-scope="scope">
<span v-if="scope.row.update_by_!==null">{{scope.row.update_by_.username}}</span>
<span v-else>{{scope.row.create_by_.username}}</span>
</template>-->
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" width="220px"> <el-table-column align="center" label="操作" width="220px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['wmaterial_scrap'])" v-if="checkPermission(['wp_scrap'])"
type="danger" type="danger"
@click="handleScrap(scope)" @click="handleScrap(scope)"
> >
报废 报废
</el-link> </el-link>
<el-link <el-link
v-if="checkPermission(['operation_hear'])&&!scope.row.ticket" v-if="checkPermission(['operation_hear'])&&scope.row.ticket==null"
type="primary" type="primary"
@click="handleRetrial(scope)" @click="handleRetrial(scope)"
> >
@ -491,7 +496,7 @@
@recordCancel="recordCancel" @recordCancel="recordCancel"
/> />
</el-dialog> </el-dialog>
<!--检查表显示--> <!--复检检验表单-->
<el-dialog <el-dialog
width="60%" width="60%"
:title="formName" :title="formName"
@ -584,7 +589,7 @@
查看 查看
</el-link> </el-link>
<el-link <el-link
v-if="checkPermission(['wp_test_init'])" v-if="checkPermission(['testrecord_delete'])"
@click="delTestRecord(scope)" @click="delTestRecord(scope)"
> >
删除 删除
@ -739,6 +744,13 @@
</el-col> </el-col>
</el-row> </el-row>
</el-dialog> </el-dialog>
<!--刷脸验证-->
<el-dialog :visible.sync="limitedPhoto" @close="closeCamera" id="loginFaceWrap">
<div style="font-size: 28px;color: #333333;text-align: center;font-weight: bold;">审核人员确认</div>
<div class="testTracking">
<faceLogin v-if="limitedPhoto" ref="faceTracking" name="faceLogin" @func="checkSubmit"></faceLogin>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -748,6 +760,7 @@
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import customForm from '@/components/customForm/index'; import customForm from '@/components/customForm/index';
import reviewForm from '@/components/customForm/review'; import reviewForm from '@/components/customForm/review';
import faceLogin from '@/components/faceLogin/review.vue';
import {createTicket, getWorkflowInit} from "@/api/workflow"; import {createTicket, getWorkflowInit} from "@/api/workflow";
import {getrecordformList, getrffieldList} from "@/api/mtm"; import {getrecordformList, getrffieldList} from "@/api/mtm";
import {getwproductList, wproductPutin, createputins, testInit, scrap, getRetrial} from "@/api/wpm"; import {getwproductList, wproductPutin, createputins, testInit, scrap, getRetrial} from "@/api/wpm";
@ -757,7 +770,7 @@
const defaultetestitem = {}; const defaultetestitem = {};
export default { export default {
inject: ['reload'], inject: ['reload'],
components: {Pagination, customForm, reviewForm}, components: {Pagination, customForm, reviewForm,faceLogin},
data() { data() {
return { return {
testitem: defaultetestitem, testitem: defaultetestitem,
@ -798,6 +811,11 @@
page: 1, page: 1,
page_size: 20, page_size: 20,
}, },
params:{
id:null,
is_testok:true,
record_data:null
},
activeName: "1", activeName: "1",
create_by_: '', create_by_: '',
update_time: '', update_time: '',
@ -874,6 +892,7 @@
mutipID: [], mutipID: [],
wproduct: null, wproduct: null,
isPost: false, isPost: false,
limitedPhoto: false,
is_midtesting: false, is_midtesting: false,
isDisabled: false, isDisabled: false,
origin_test: null, origin_test: null,
@ -1466,14 +1485,16 @@
}); });
}, },
//记录提交检查项目 //记录提交检查项目出现人脸验证弹窗
recordSubmit(value) { recordSubmit(value) {
let that = this; let that = this;
let id = value.id;
let params = {}; let params = {};
params.record_data = value.record_data; params.id = value.id;
params.is_testok = value.is_testok; params.is_testok = value.is_testok;
putTestRecordItem(id, params).then((res) => { params.record_data = value.record_data;
that.params = params;
that.limitedPhoto = true;
/*putTestRecordItem(id, params).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
subTestRecordItem(id, params).then((res) => { subTestRecordItem(id, params).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
@ -1492,7 +1513,44 @@
} }
}).catch((err) => { }).catch((err) => {
this.$message.error(err); this.$message.error(err);
}); });*/
},
checkSubmit(data){
debugger;
let that =this;
let id = that.params.id;
let params = new Object();
params.is_testok = that.params.is_testok;
params.record_data = that.params.record_data;
params.token = data.token;
if(data.token!==''&&data.token!==null&&data.token!==undefined) {
putTestRecordItem(id, params).then((res) => {
if (res.code >= 200) {
subTestRecordItem(id, params).then((res) => {
debugger;
that.limitedPhoto = false;
if (res.code >= 200) {
that.recordVisible = false;
that.limitedReview = false;
that.limitedCheckRecord = false;
that.getList();
that.getList2();
that.getList1();
that.getList3();
that.refreshRecord();
}else{
that.$message.error(res.msg)
}
}).catch(()=>{
that.limitedPhoto = false;
});
} else {
that.$message.error(res.msg)
}
}).catch((err) => {
that.$message.error(err);
});
}
}, },
//第一次保存提交检查项目 //第一次保存提交检查项目
@ -1504,6 +1562,19 @@
this.getList1(); this.getList1();
this.getList3(); this.getList3();
}, },
/*关闭相机*/
closeCamera () {
this.$refs.faceTracking.closeCamera();
let video = document.getElementById('video');
let stream = video.srcObject;
// console.log(stream);
let tracks = stream.getTracks();
tracks.forEach(track => {
track.stop()
});
video.srcObject = null;
},
}, },
mounted() { mounted() {
getUserList({page: 0}).then(response => { getUserList({page: 0}).then(response => {

View File

@ -3,6 +3,7 @@
<el-card class="box-card"> <el-card class="box-card">
<el-tabs <el-tabs
type="border-card" type="border-card"
v-model="activeName"
@tab-click="handleClick" @tab-click="handleClick"
> >
<el-tab-pane <el-tab-pane
@ -28,13 +29,14 @@
</el-table-column> </el-table-column>
<el-table-column label="是否提交"> <el-table-column label="是否提交">
<template slot-scope="scope"> <template slot-scope="scope">
<el-span v-if="scope.row.is_submited"></el-span> <span v-if="scope.row.is_submited"></span>
<el-span v-else></el-span> <span v-else></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作人"> <el-table-column label="操作人">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.create_by_.username}} <span v-if="scope.row.update_by_!==null">{{scope.row.update_by_.username}}</span>
<span v-else>{{scope.row.create_by_.username}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="过程记录表"> <el-table-column label="过程记录表">
@ -122,6 +124,7 @@
page: 1, page: 1,
page_size: 20, page_size: 20,
}, },
activeName: "",
processOption: "", processOption: "",
}; };
}, },
@ -143,6 +146,10 @@
getProcessList({page: 0}).then((response) => { getProcessList({page: 0}).then((response) => {
if (response.data) { if (response.data) {
this.processOption = response.data; this.processOption = response.data;
this.activeName = response.data[0].id;
this.process = response.data[0].id;
this.listQuery.step__process = response.data[0].id;
this.getList();
} }
}); });
}, },
@ -160,7 +167,6 @@
this.process = tab.name; this.process = tab.name;
this.listQuery.step__process = tab.name; this.listQuery.step__process = tab.name;
this.getList(); this.getList();
}, },
//操作记录删除 //操作记录删除

View File

@ -249,7 +249,6 @@
<el-table-column align="center" label="操作" width="100px"> <el-table-column align="center" label="操作" width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['warehouse_update'])"
type="primary" type="primary"
@click="handlerecord(scope)" @click="handlerecord(scope)"
>填写表单 >填写表单