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

This commit is contained in:
caoqianming 2022-05-07 13:54:41 +08:00
commit b02edd3751
16 changed files with 688 additions and 493 deletions

View File

@ -2,10 +2,10 @@
<div class="faceLoginWrap">
<div style="height: 500px;">
<div class="video-box">
<video id="video" width="500" height="500" preload autoplay loop muted></video>
<canvas id="canvas" width="500" height="500"></canvas>
<video id="video" width="600" preload autoplay loop muted></video>
<canvas id="canvas" width="600" height="500"></canvas>
</div>
<canvas id="screenshotCanvas" width="500" height="500"></canvas>
<canvas id="screenshotCanvas" width="600" height="500"></canvas>
</div>
</div>
</template>
@ -132,7 +132,7 @@
if(res.data.access){
let item= {name:res.data.name,token:res.data.access};
that.$emit('func',item);
that.$message.success("身份认证成功!");
// that.$message.success("身份认证成功!");
this.closeCamera();
}else{
that.uploadLock = false;
@ -165,7 +165,6 @@
beforeDestroy() {
let video = document.getElementById('video');
let stream = video.srcObject;
// console.log(stream);
let tracks = stream.getTracks();
tracks.forEach(track => {
track.stop()
@ -188,8 +187,7 @@
.video-box {
margin: auto;
position: relative;
width: 500px;
height: 500px;
width: 600px;
text-align: center;
}

View File

@ -14,6 +14,13 @@
:rules="loginRules"
>
<el-form-item prop="username">
<input
type="text"
name="username"
autocomplete="off"
onfocus="passwordType=='password'"
style="display: none;height: 0;padding: 0;"
>
<el-input
ref="username"
v-model="loginForm.username"
@ -21,16 +28,26 @@
name="username"
type="text"
tabindex="1"
auto-complete="on"
><svg-icon
auto-complete="off"
>
<svg-icon
slot="prefix"
icon-class="userName"
class="el-input__icon input-icon"
/></el-input>
/>
</el-input>
</el-form-item>
<el-form-item prop="password">
<input
type="password"
name="password"
autocomplete="off"
onfocus="passwordType=='password'"
style="display: none;height: 0;padding: 0;"
>
<el-input
id="passwordInput"
:key="passwordType"
ref="password"
v-model="loginForm.password"
@ -38,18 +55,18 @@
placeholder="密码"
name="password"
tabindex="2"
auto-complete="on"
id="passwordInput"
autocomplete="new-password"
auto-complete="new-password"
@keyup.enter.native="handleLogin"
><svg-icon
>
<svg-icon
slot="prefix"
icon-class="password"
class="el-input__icon input-icon"
/></el-input>
<span class="show-pwd" @click="showPwd">
<svg-icon
:icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"
/>
</el-input>
<span class="show-pwd" @click="showPwd">
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"/>
</span>
</el-form-item>
<el-button
@ -57,8 +74,9 @@
type="primary"
style="width: 100%; margin-bottom: 30px"
@click.native.prevent="handleLogin"
>登录</el-button
>
登录
</el-button>
</el-form>
</el-tab-pane>
</el-tabs>
@ -75,10 +93,11 @@
<script>
import faceLogin from '@/components/faceLogin/tracking.vue'
export default {
name: "Login",
inject:['reload'],
components:{
inject: ['reload'],
components: {
faceLogin
},
data() {
@ -105,7 +124,7 @@
password: "",
},
loginRules: {
username: [{ required: true, trigger: "blur", message: "请输入账户" }],
username: [{required: true, trigger: "blur", message: "请输入账户"}],
password: [
{
required: true,
@ -125,8 +144,10 @@
};
},
created() {
this.getUP();
localStorage.setItem('tolerance','0.42');
// this.getUP();
this.loginForm.username = null;
this.loginForm.password = null;
localStorage.setItem('tolerance', '0.36');
},
watch: {
$route: {
@ -136,8 +157,14 @@
immediate: true,
},
},
mounted() {
this.loginForm.username = null;
this.loginForm.password = null;
this.$refs.username = null;
this.$refs.password = null;
},
methods: {
toBigScreen(){
toBigScreen() {
this.$router.push('/index')
},
showPwd() {
@ -159,7 +186,8 @@
.dispatch("user/login", this.loginForm)
.then(() => {
this.$store.dispatch("user/getCount", {});
this.$router.push({ path: this.redirect || "/" }, () => {});
this.$router.push({path: this.redirect || "/"}, () => {
});
this.loading = false;
localStorage.setItem("rem_username", this.loginForm.username);
localStorage.setItem("rem_password", this.loginForm.password);
@ -175,24 +203,17 @@
});
},
//读取cookie
getUP() {
this.loginForm.username = localStorage.getItem("rem_username");
this.loginForm.password = localStorage.getItem("rem_password");
},
//人脸登录
takePhoto(){
takePhoto() {
this.limitedPhoto = true;
},
/*关闭相机*/
closeCamera () {
debugger;
closeCamera() {
this.reload();
this.$refs.faceTracking.closeCamera();
// this.thisVideo.srcObject.getTracks()[0].stop();
},
getMsgFormSon(data){
getMsgFormSon(data) {
// this.limitedPhoto = data;
},
},
@ -208,11 +229,13 @@
background-image: url("../../assets/bg-login.png");
background-size: cover;
}
.title {
margin: 30px auto 30px auto;
text-align: center;
color: #0174d7;
}
.logo {
width: 350px;
height: 140px;
@ -229,46 +252,56 @@
.el-input {
height: 45px;
input {
height: 45px;
}
}
.input-icon {
height: 39px;
width: 14px;
margin-left: 2px;
}
}
.faceLoginBtnWrap{
.faceLoginBtnWrap {
width: 250px;
border-right: 1px dashed #409EFF;
text-align: center;
}
.faceLoginBtn{
.faceLoginBtn {
width: 150px;
margin-top: 90px;
}
#passwordInput{
#passwordInput {
padding-right: 35px;
}
.show-pwd {
height: 39px;
margin-right: 2px;
}
.login-tip {
font-size: 13px;
text-align: center;
color: #bfbfbf;
}
.login-code {
width: 33%;
height: 38px;
float: right;
img {
cursor: pointer;
vertical-align: middle;
}
}
.show-pwd {
position: absolute;
right: 10px;
@ -277,11 +310,13 @@
cursor: pointer;
user-select: none;
}
.login-code-img {
height: 38px;
}
.testTracking{
width:100%;
.testTracking {
width: 100%;
height: 500px;
}
</style>

View File

@ -24,15 +24,16 @@
{{ materialdetail.count }}
</el-descriptions-item>
<el-descriptions-item label="文件">
<el-link :href="materialdetail.file_.path">{{materialdetail.file_.name}}</el-link>
<el-link v-if="materialdetail.file_" :href="materialdetail.file_.path">{{materialdetail.file_.name}}
</el-link>
</el-descriptions-item>
</el-descriptions>
</el-card>
<el-tabs v-model="activeName" type="card">
<el-tab-pane
v-if="this.type == 3 || this.type == 4"
label="供应商"
name="5"
v-if="this.type == 3 || this.type == 4"
>
</el-tab-pane>
<el-tab-pane label="批次" name="3">
@ -44,7 +45,7 @@
height="460"
highlight-current-row
>
<el-table-column type="index" width="50" />
<el-table-column type="index" width="50"/>
<el-table-column label="物料批次">
<template slot-scope="scope">{{ scope.row.batch }}</template>
</el-table-column>
@ -68,7 +69,6 @@
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="关联的订单" name="1">
<el-table
:data="orderlist"
@ -78,7 +78,7 @@
highlight-current-row
height="460"
>
<el-table-column type="index" width="50" />
<el-table-column type="index" width="50"/>
<el-table-column label="订单编号" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.number }}</template>
@ -86,22 +86,26 @@
<el-table-column label="客户" show-overflow-tooltip>
<template slot-scope="scope">{{
scope.row.customer_.name
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="所属合同" show-overflow-tooltip>
<template slot-scope="scope">{{
scope.row.contract_.name
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="产品名称" show-overflow-tooltip>
<template slot-scope="scope">{{
scope.row.product_.name
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="产品型号" show-overflow-tooltip>
<template slot-scope="scope">{{
scope.row.product_.specification
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="产品数量">
<template slot-scope="scope">{{ scope.row.count }}</template>
@ -109,12 +113,14 @@
<el-table-column label="交货日期">
<template slot-scope="scope">{{
scope.row.delivery_date
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="创建时间">
<template slot-scope="scope">{{
scope.row.create_time
}}</template>
}}
</template>
</el-table-column>
</el-table>
</el-tab-pane>
@ -127,7 +133,7 @@
style="width: 100%"
height="460"
>
<el-table-column type="index" width="50" />
<el-table-column type="index" width="50"/>
<el-table-column label="任务编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
@ -135,12 +141,14 @@
<el-table-column label="订单编号">
<template slot-scope="scope">{{
scope.row.order_.number
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="合同编号">
<template slot-scope="scope">{{
scope.row.order_.contract_.number
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="生产数量">
@ -155,7 +163,8 @@
<el-table-column label="交付截止时间">
<template slot-scope="scope">{{
scope.row.order_.delivery_date
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="是否生成子计划">
@ -167,7 +176,8 @@
<el-table-column label="创建时间">
<template slot-scope="scope">{{
scope.row.create_time
}}</template>
}}
</template>
</el-table-column>
</el-table>
</el-tab-pane>
@ -184,7 +194,7 @@
style="width: 100%"
height="460"
>
<el-table-column type="index" width="50" />
<el-table-column type="index" width="50"/>
<el-table-column label="玻璃编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
@ -196,16 +206,17 @@
<el-table-column label="状态">
<template slot-scope="scope">{{
actstate_[scope.row.act_state]
}}</template>
}}
</template>
</el-table-column>
<el-table-column label="仓库">
<template slot-scope="scope" v-if="scope.row.warehouse_">{{
scope.row.warehouse_.name
}}</template>
}}
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="装箱单" name="5" v-if="this.type == 1">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate">
新增装箱单
@ -218,20 +229,15 @@
style="width: 100%"
height="460"
>
<el-table-column type="index" width="50" />
<el-table-column type="index" width="50"/>
<el-table-column label="名称">
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
<el-table-column label="单位">
<template slot-scope="scope">{{ scope.row.unit }}</template>
</el-table-column>
<el-table-column label="数量">
<template slot-scope="scope" >{{
scope.row.count
}}</template>
<template slot-scope="scope">{{scope.row.count}}</template>
</el-table-column>
<el-table-column
align="center"
@ -239,19 +245,17 @@
width="220px"
>
<template slot-scope="scope">
<el-link
type="primary"
@click="handleEdit(scope)"
>编辑
>
编辑
</el-link>
<el-link
type="danger"
@click="handleDelete(scope)"
>删除
>
删除
</el-link>
</template>
</el-table-column>
@ -271,24 +275,25 @@
<el-form-item label="物料"
prop="material"
>
<el-select v-model="packitem.material" @change="selectmaterial" >
<el-select v-model="packitem.material" @change="selectmaterial">
<el-option
v-for="item in materialoptions"
:key="item.id"
:value="item.id"
:label="item.name"
>
:value="item.id">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.specification }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="名称" prop="name">
<el-input v-model="packitem.name" placeholder="名称" />
<el-input v-model="packitem.name" placeholder="名称"/>
</el-form-item>
<el-form-item label="单位" prop="unit">
<el-input v-model="packitem.unit" placeholder="单位" />
<el-input v-model="packitem.unit" placeholder="单位"/>
</el-form-item>
<el-form-item label="型号" prop="specification">
<el-input v-model="packitem.specification" placeholder="型号" />
<el-input v-model="packitem.specification" placeholder="型号"/>
</el-form-item>
<el-form-item label="数量" prop="count">
<el-input-number
@ -309,9 +314,12 @@
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false"
>取消</el-button
<el-button
type="danger"
@click="dialogVisible = false"
>
取消
</el-button>
<el-button type="primary" @click="confirm('Form')">确认</el-button>
</div>
</el-dialog>
@ -322,27 +330,35 @@
</template>
<script>
import checkPermission from "@/utils/permission";
import vueJsonEditor from "vue-json-editor";
import { upUrl, upHeaders } from "@/api/file";
import { getProductionplanList } from "@/api/pm";
import { getmaterialbatchList } from "@/api/inm";
import { getOrderList } from "@/api/sam";
import { getMaterial,getpackitemList,createpackitem,updatepackitem,deletepackitem,getMaterialList } from "@/api/mtm";
import { getwproductList } from "@/api/wpm";
import checkPermission from "@/utils/permission";
import vueJsonEditor from "vue-json-editor";
import {upUrl, upHeaders} from "@/api/file";
import {getProductionplanList} from "@/api/pm";
import {getmaterialbatchList} from "@/api/inm";
import {getOrderList} from "@/api/sam";
import {
getMaterial,
getpackitemList,
createpackitem,
updatepackitem,
deletepackitem,
getMaterialList
} from "@/api/mtm";
import {getwproductList} from "@/api/wpm";
import { upFile } from "@/api/file";
import { genTree } from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
const defaultpackitem = {
name:"",
unit:"",
specification:"",
import {upFile} from "@/api/file";
import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
const defaultpackitem = {
name: "",
unit: "",
specification: "",
};
export default {
components: { Pagination, vueJsonEditor, Treeselect },
export default {
components: {Pagination, vueJsonEditor, Treeselect},
data() {
return {
materialdetail: "",
@ -351,11 +367,11 @@ export default {
productionplanList: [],
InventoryList: [],
activeName: "3",
packitem:defaultpackitem,
packitem: defaultpackitem,
dialogVisible: false,
dialogType: "new",
pickList:[],
materialoptions:[],
pickList: [],
materialoptions: [],
actstate_: {
6: "待复检",
10: "操作进行中",
@ -380,7 +396,7 @@ export default {
created() {
this.material = this.$route.params.id;
this.type = this.$route.params.type;
this.getMaterialist()
this.getMaterialist();
this.getMaterial();
this.getpickList();
this.getOrderList();
@ -390,32 +406,25 @@ export default {
},
methods: {
//新增装箱单
getMaterialist()
{
getMaterialList({ pageoff: true,type:3 }).then((response) => {
getMaterialist() {
getMaterialList({pageoff: true, type: 3}).then((response) => {
if (response.data) {
this.materialoptions = response.data;
}
});
},
selectmaterial(selval){
selectmaterial(selval) {
getMaterial(selval).then((response) => {
if (response.data) {
this.packitem.name = response.data.name;
this.packitem.unit = response.data.unit;
this.packitem.specification = response.data.specification;
}
});
},
},
handleCreate() {
handleCreate() {
this.packitem = Object.assign({}, defaultpackitem);
this.dialogType = "new";
this.dialogVisible = true;
@ -431,6 +440,7 @@ handleCreate() {
this.$refs["Form"].clearValidate();
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
@ -446,6 +456,7 @@ handleCreate() {
console.error(err);
});
},
async confirm(form) {
this.$refs[form].validate((valid) => {
if (valid) {
@ -459,7 +470,7 @@ handleCreate() {
}
});
} else {
this.packitem.product=this.material;
this.packitem.product = this.material;
createpackitem(this.packitem).then((res) => {
if (res.code >= 200) {
this.getpickList();
@ -474,31 +485,32 @@ handleCreate() {
});
},
getpickList()
{
getpackitemList({ product: this.material, page: 0 }).then((response) => {
getpickList() {
getpackitemList({product: this.material, page: 0}).then((response) => {
if (response.data) {
this.pickList = response.data; //zhuangxiang信息
}
});
},
},
getMaterial() {
getMaterial(this.material).then((response) => {
if (response.data) {
// debugger;
this.materialdetail = response.data; //物料基本信息
}
});
},
getOrderList() {
getOrderList({ material: this.material, page: 0 }).then((response) => {
getOrderList({material: this.material, page: 0}).then((response) => {
if (response.data) {
this.orderlist = response.data; //物料关联的订单
}
});
},
getplanList() {
getProductionplanList({ material: this.material, page: 0 }).then(
getProductionplanList({material: this.material, page: 0}).then(
(response) => {
if (response.data) {
this.productionplanList = response.data; //物料关联计划
@ -508,7 +520,7 @@ getpickList()
},
getmaterialbatchList() {
getmaterialbatchList({ material: this.material, page: 0 }).then(
getmaterialbatchList({material: this.material, page: 0}).then(
(response) => {
if (response.data) {
this.InventoryList = response.data;
@ -517,13 +529,13 @@ getpickList()
);
},
getwproductList() {
getwproductList({ material: this.material, page: 0 }).then((response) => {
getwproductList({material: this.material, page: 0}).then((response) => {
if (response.data) {
this.wproductList = response.data; //半成品
}
});
},
},
};
};
</script>

View File

@ -449,9 +449,9 @@
</el-col>
</el-row>
</el-form-item>
<el-form-item label="字段父级">
<!--<el-form-item label="字段父级">
<treeselect v-model="field.parent" :multiple="false" :options="treeDate" placeholder="字段父级"/>
</el-form-item>
</el-form-item>-->
<el-form-item label="字段说明">
<el-input v-model="field.help_text" placeholder="字段名称"/>
</el-form-item>

View File

@ -633,8 +633,7 @@
getMaterial,
getInputmaterialList,
createInputmaterial,
updateInputmaterial
,
updateInputmaterial,
deleteInputmaterial,
getOutputmaterialList,
createOutputmaterial,
@ -648,8 +647,7 @@
gettechdocList,
createtechdoc,
updatetechdoc,
deletetechdoc
,
deletetechdoc,
getsubproducationList,
createsubproducation,
updatesubproducation,
@ -763,6 +761,7 @@
let hei = document.getElementsByClassName('app-main')[0].clientHeight;
let h = document.getElementById('processCard').clientHeight;
that.halfHeight = (hei - h - 176) / 2;
this.getmaterialList();//物料列表
},
methods: {
checkPermission,

View File

@ -333,9 +333,9 @@ export default {
this.user.avatar = res.data.path;
},
beforeAvatarUpload(file) {
const isLt2M = file.size / 1024 / 1024 < 5;
const isLt2M = file.size / 1024 / 1024 < 10;
if (!isLt2M) {
this.$message.error("上传头像图片大小不能超过 5MB!");
this.$message.error("上传头像图片大小不能超过 10MB!");
}
return isLt2M;
},
@ -344,9 +344,9 @@ export default {
return data.label.indexOf(value) !== -1;
},
beforeUpload(file) {
const isLt1M = file.size / 1024 / 1024 < 5;
const isLt1M = file.size / 1024 / 1024 < 10;
if (!isLt1M) {
this.$message.error("上传头像图片大小不能超过 5MB!");
this.$message.error("上传头像图片大小不能超过 10MB!");
}
return isLt1M;
},

View File

@ -55,8 +55,8 @@
</el-table-column>
<el-table-column label="地址" prop="address" min-width="120" show-overflow-tooltip>
</el-table-column>
<el-table-column label="供应物料" prop="material">
</el-table-column>
<!-- <el-table-column label="供应物料" prop="material">
</el-table-column>-->
<el-table-column label="备注" prop="description">
</el-table-column>
<el-table-column label="创建时间" prop="create_time" width="160">

View File

@ -112,6 +112,10 @@
@click="handleRecordDetail(scope)"
>查看
</el-link>
<el-link
@click="handleRecordExport(scope)"
>导出
</el-link>
</template>
</el-table-column>
</el-table>
@ -155,11 +159,11 @@
</div>
</template>
<script>
import {getfifodetailList} from "@/api/inm";
// import {getfifodetailList} from "@/api/inm";
import checkPermission from "@/utils/permission";
import {mtest, getwproductList} from "@/api/wpm";
import {getrecordformList, getrffieldList} from "@/api/mtm";
import {getTestRecord, getTestRecordItem} from "@/api/qm";
// import {getrecordformList, getrffieldList} from "@/api/mtm";
import {getTestRecord, getTestRecordItem,getTestRecordExport} from "@/api/qm";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
export default {
@ -279,6 +283,18 @@
}
})
},
handleRecordExport(scope){
let exportFormId = scope.row.id;
getTestRecordExport(exportFormId).then(res=>{
if(res.code===200){
let link = document.createElement('a');
link.href = res.data.path;
document.body.appendChild(link);
link.click();
}
})
},
},
};
</script>

View File

@ -48,6 +48,7 @@
<el-table-column align="center" label="操作">
<template slot-scope="scope">
<el-link @click="handleRecordDetail(scope)">查看</el-link>
<el-link @click="handleRecordExport(scope)">导出</el-link>
</template>
</el-table-column>
</el-table>
@ -90,8 +91,7 @@
<script>
import checkPermission from "@/utils/permission";
import {getProductionplan} from "@/api/pm";
import {getTestRecord, getTestRecordItem} from "@/api/qm";
import {getTestRecord, getTestRecordItem,getTestRecordExport} from "@/api/qm";
export default {
data() {
return {
@ -175,6 +175,18 @@
}
})
},
handleRecordExport(scope){
let exportFormId = scope.row.id;
// debugger;
getTestRecordExport(exportFormId).then(res=>{
if(res.code===200){
let link = document.createElement('a');
link.href = res.data.path;
document.body.appendChild(link);
link.click();
}
})
},
},
};
</script>

View File

@ -391,7 +391,7 @@
//不合格玻璃审理单查看
handledetailbhg(scope) {
this.$router.push({name: "ticketDetail", params: {ticketId: scope.row.ticket}})
this.$router.push({name: "ticketDetail", params: {ticketId: scope.row.ticket,workflow:scope.row.workflow}})
},
//入场检验不合格

View File

@ -39,20 +39,17 @@
width="220px"
>
<template slot-scope="scope">
<el-link
v-if="checkPermission(['customfield_update'])"
@click="handleEdit(scope)"
>编辑
</el-link
>
编辑
</el-link>
<el-link
v-if="checkPermission(['customfield_delete'])"
type="danger"
@click="handleDeleteCustomfield(scope)"
>删除
</el-link
>
删除
</el-link>
</template>
</el-table-column>
</el-table>

View File

@ -1,11 +1,14 @@
<template>
<div class="app-container">
<el-card>
<div style="margin-top: 2px">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
>新增</el-button
<el-button
type="primary"
icon="el-icon-plus"
@click="handleCreate"
>
新增
</el-button>
</div>
</el-card>
<el-card style="margin-top: 2px">
@ -13,7 +16,7 @@
:data="wftransitionList"
style="width: 100%"
>
<el-table-column type="index" width="50" />
<el-table-column type="index" width="50"/>
<el-table-column width="180" label="名称">
<template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column>
@ -34,29 +37,24 @@
<el-table-column width="180" label="创建时间">
<template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column>
<el-table-column
align="center"
label="操作"
width="220px"
>
<template slot-scope="scope">
<el-link @click="handleEdit(scope)">
编辑
</el-link>
<el-link
v-if="checkPermission(['wftransition_update'])"
@click="handleEdit(scope)"
>编辑</el-link
>
<el-link
v-if="checkPermission(['wftransition_delete'])"
type="danger"
@click="handleDelete(scope)"
>删除</el-link
>
删除
</el-link>
</template>
</el-table-column>
</el-table>
</el-card>
<el-dialog
:visible.sync="dialogVisible"
@ -70,13 +68,12 @@
:rules="rule1"
>
<el-form-item label="名称" prop="name">
<el-input v-model="wftransition.name" placeholder="名称" />
<el-input v-model="wftransition.name" placeholder="名称"/>
</el-form-item>
<el-form-item label="定时器(单位秒)" prop="timer">
<el-input v-model="wftransition.timer" type="number" placeholder="0" />
<el-input v-model="wftransition.timer" type="number" placeholder="0"/>
</el-form-item>
<el-form-item label="源状态" prop="source_state">
<el-select v-model="wftransition.source_state" placeholder="请选择" style="width:100%">
<el-option
v-for="item in stateoptions"
@ -116,9 +113,7 @@
</el-form-item>
<el-form-item label="是否校验必填" prop="field_require_check">
<el-switch v-model="wftransition.field_require_check"></el-switch>
</el-form-item>
</el-form>
<div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
@ -128,27 +123,34 @@
</div>
</template>
<script>
import {getWfStateList, getWfTransitionList, createWfTransition,updateWfTransition,deleteWfTransition } from "@/api/workflow";
import checkPermission from "@/utils/permission";
import vueJsonEditor from 'vue-json-editor'
import { genTree } from "@/utils"
const defaultwftransition = {
import {
getWfStateList,
getWfTransitionList,
createWfTransition,
updateWfTransition,
deleteWfTransition
} from "@/api/workflow";
import checkPermission from "@/utils/permission";
import vueJsonEditor from 'vue-json-editor'
import {genTree} from "@/utils"
const defaultwftransition = {
name: "",
};
export default {
components: { vueJsonEditor },
};
export default {
components: {vueJsonEditor},
name: "TST",
props: ["ID"],
data() {
return {
wftransition: defaultwftransition,
condition_expression:false,
condition_expression: false,
/*wftransitionList: {
count:0
},*/
wftransitionList:[],
lable:'',
options_:[],
wftransitionList: [],
lable: '',
options_: [],
options: [{
value: 1,
label: '同意'
@ -160,11 +162,11 @@ export default {
label: '其他'
}],
stateoptions:[],
stateoptions: [],
dialogVisible: false,
dialogType: "new",
rule1: {
name: [{ required: true, message: "请输入", trigger: "blur" }],
name: [{required: true, message: "请输入", trigger: "blur"}],
},
@ -233,7 +235,7 @@ export default {
}
});
} else {
this.wftransition.workflow=this.ID;
this.wftransition.workflow = this.ID;
createWfTransition(this.wftransition).then((res) => {
if (res.code >= 200) {
this.getList();
@ -263,5 +265,5 @@ export default {
});
},
},
};
};
</script>

View File

@ -91,6 +91,13 @@
>
查看
</el-link>
<el-link
v-if="scope.row.leader_1!==null&&scope.row.leader_2!==null&&scope.row.leader_3!==null"
type="primary"
@click="handleExportClick(scope)"
>
导出
</el-link>
</template>
</el-table-column>
</el-table>
@ -239,6 +246,7 @@
import faceLogin from '@/components/faceLogin/review.vue';
import {getProcessList,getrecordformList} from "@/api/mtm";
import {getsubplanList} from "@/api/wpm";
import {getTestRecordExport} from "@/api/qm";
import {firstTestInit,firstAudit} from "@/api/pm";
import {getTestRecordItem,putTestRecordItem,subTestRecordItem} from "@/api/qm";
@ -357,6 +365,7 @@
//首件审批
handleSelectclick(scope,index){
let that = this;
debugger;
this.reviewVisible = true;
that.planId = scope.row.id;
that.leader_1 = scope.row.leader_1_?scope.row.leader_1_.name:null;
@ -471,6 +480,8 @@
that.checkParams = params;
that.limitedUserCheck = true;
},
//人脸识别获取人员信息后
checkSubmit(data){
let that =this;
let id = that.checkParams.id;
@ -478,7 +489,13 @@
params.is_testok = that.checkParams.is_testok;
params.record_data = that.checkParams.record_data;
params.token = data.token;
let text = '确定以操作员'+data.name+'身份提交?';
if(data.token!==''&&data.token!==null&&data.token!==undefined) {
this.$confirm(text, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
putTestRecordItem(id, params).then((res) => {
if (res.code >= 200) {
subTestRecordItem(id, params).then((res) => {
@ -499,6 +516,9 @@
}).catch((err) => {
that.$message.error(err);
});
}).catch(() => {
that.limitedUserCheck = false;
});
}
},
@ -584,6 +604,17 @@
})
}
},
handleExportClick(scope){
let exportFormId = scope.row.id;
getTestRecordExport(exportFormId).then(res=>{
if(res.code===200){
let link = document.createElement('a');
link.href = res.data.path;
document.body.appendChild(link);
link.click();
}
})
},
},
mounted() {
this.getProcessList();

View File

@ -1544,12 +1544,17 @@
params.is_testok = that.params.is_testok;
params.record_data = that.params.record_data;
params.token = data.token;
let text = '确定以操作员'+data.name+'身份提交?';
if (data.token !== '' && data.token !== null && data.token !== undefined) {
this.$confirm(text, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.limitedPhoto = false;
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;
@ -1562,15 +1567,17 @@
} else {
that.$message.error(res.msg)
}
}).catch(() => {
that.limitedPhoto = false;
});
}).catch(() => {});
} else {
that.$message.error(res.msg)
}
}).catch((err) => {
that.$message.error(err);
});
}).catch(() => {
that.limitedPhoto = false;
});
}
},

View File

@ -253,6 +253,12 @@
@click="handlerecord(scope)"
>填写表单
</el-link>
<el-link
v-if="scope.row.is_filled"
type="primary"
@click="handlerecordExport(scope)"
>导出
</el-link>
</template>
</el-table-column>
</el-table>
@ -646,7 +652,6 @@
.word-wrap {
padding: 25px;
}
.box-card {
height: 300px;
}
@ -668,22 +673,20 @@
deleteOperationequip,
deleteOperationwproduct,
gettoolList,
createTool,
createInputs,
recordInit,
createOutputs,
deleteOperationeinput,
wproductPlace,
} from "@/api/wpm";
import mammoth from "mammoth";
import {getrffieldList, gettechdocList} from "@/api/mtm";
import { gettechdocList} from "@/api/mtm";
import checkPermission from "@/utils/permission";
import {getprogressList} from "@/api/pm";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import {getTestRecordExport} from "@/api/qm";
import faceLogin from '@/components/faceLogin/review.vue';
export default {
components: {Pagination, faceLogin},
components: {faceLogin},
inject: ["reload"],
data() {
return {
@ -810,8 +813,7 @@
pdf: "",
};
},
computed: {},
watch: {},
created() {
this.id = this.$route.params.id; //操作ID
this.readbook();
@ -825,6 +827,7 @@
this.getprogressList(); //产出物料调出
this.gettoolList(); //工序工装
},
methods: {
checkPermission,
@ -990,13 +993,23 @@
this.formID = scope.row.id;
recordInit(this.formID).then((response) => {
if (response.data) {
debugger;
this.fieldList = response.data;
this.fieldList.name = response.data.form_.name;
}
});
this.dialogVisibleForm = true;
},
handlerecordExport(scope){
let exportFormId = scope.row.id;
getTestRecordExport(exportFormId).then(res=>{
if(res.code===200){
let link = document.createElement('a');
link.href = res.data.path;
document.body.appendChild(link);
link.click();
}
})
},
//工序工装列表
gettoolList() {
@ -1207,9 +1220,10 @@
getMsgFormSon(data) {
let that = this;
that.operationData.user = data.name;
let text = '确定以操作员'+data.name+'身份提交?';
if (data.token !== '' && data.token !== null && data.token !== undefined) {
if (that.inputData == "") {
that.$confirm("没有消耗物料确定提交吗?", "提示", {
that.$confirm("没有消耗物料"+text, "提示", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
@ -1228,6 +1242,12 @@
that.limitedPhoto = false;
});
} else {
this.$confirm(text, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.limitedPhoto = false;
submitOperation(that.id,{token:data.token}).then((res) => {
if (res.code === 200) {
that.$router.push({name: "operation"});
@ -1238,6 +1258,10 @@
}).catch((err) => {
that.$message.error(err);
});
}).catch(() => {
that.limitedPhoto = false;
});
}
}
},

View File

@ -288,16 +288,27 @@
<el-button type="primary" @click="putins"> </el-button>
</div>
</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="getMsgFormSon"
></faceLogin>
</div>
</el-dialog>
</div>
</template>
<script>
// import {getOrderList} from "@/api/sam";
import checkPermission from "@/utils/permission";
import {getWarehouseList} from "@/api/inm";
import { getrecordformList, getrffieldList} from "@/api/mtm";
// import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import customForm from "@/components/customForm/index";
import faceLogin from '@/components/faceLogin/review.vue';
import {
getwproductList,
wproductTest,
@ -315,12 +326,12 @@
const defaultetestitem = {};
export default {
components: {Pagination, customForm},
components: {Pagination, customForm,faceLogin},
data() {
return {
testitem: defaultetestitem,
form: {remark: "", warehouse: ""},
form1: {},
submitForm: {},
wproductList: {
count: 0,
},
@ -372,11 +383,13 @@
recordList: [],
recordformList: [],
recordform: null,
submitFormId: null,
fifo_detail: "",
listQueryrecordform: {
page: 0,
},
hasPicture: false,
limitedPhoto: false,
outerVisible: false,
innerVisible: false,
dialogFormVisible: false,
@ -680,12 +693,12 @@
//记录提交检查项目
recordSubmit(value) {
let that = this;
let id = value.id;
let params = {};
params.record_data = value.record_data;
params.is_testok = value.is_testok;
putTestRecordItem(id, params)
// let that = this;
this.submitFormId = value.id;
this.submitForm.record_data = value.record_data;
this.submitForm.is_testok = value.is_testok;
this.limitedPhoto = true;
/*putTestRecordItem(id, params)
.then((res) => {
if (res.code >= 200) {
subTestRecordItem(id, params).then((res) => {
@ -704,7 +717,7 @@
})
.catch((err) => {
this.$message.error(err);
});
});*/
},
//第一次保存提交检查项目
@ -712,6 +725,55 @@
this.outerVisible = false;
this.innerVisible = false;
},
//获取人脸数据
getMsgFormSon(data) {
let that = this;
let text = '确定以操作员'+data.name+'身份提交?';
if (data.token !== '' && data.token !== null && data.token !== undefined) {
this.$confirm(text, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
that.limitedPhoto = false;
putTestRecordItem(this.submitFormId, that.submitForm)
.then((res) => {
if (res.code >= 200) {
subTestRecordItem(this.submitFormId, that.submitForm).then((res) => {
if (res.code >= 200) {
that.innerVisible = false;
that.limitedReview = false;
that.limitedCheckRecord = false;
this.getList();
this.getList1();
that.refreshRecord();
}
});
} else {
this.$message.error(res.msg);
}
})
.catch((err) => {
this.$message.error(err);
});
}).catch(() => {
that.limitedPhoto = false;
});
}
},
/*关闭相机*/
closeCamera() {
this.$refs.faceTracking.closeCamera();
let video = document.getElementById('video');
let stream = video.srcObject;
let tracks = stream.getTracks();
tracks.forEach(track => {
track.stop()
});
video.srcObject = null;
},
},
};
</script>