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

View File

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

View File

@ -24,15 +24,16 @@
{{ materialdetail.count }} {{ materialdetail.count }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="文件"> <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-item>
</el-descriptions> </el-descriptions>
</el-card> </el-card>
<el-tabs v-model="activeName" type="card"> <el-tabs v-model="activeName" type="card">
<el-tab-pane <el-tab-pane
v-if="this.type == 3 || this.type == 4"
label="供应商" label="供应商"
name="5" name="5"
v-if="this.type == 3 || this.type == 4"
> >
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="批次" name="3"> <el-tab-pane label="批次" name="3">
@ -44,7 +45,7 @@
height="460" height="460"
highlight-current-row highlight-current-row
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50"/>
<el-table-column label="物料批次"> <el-table-column label="物料批次">
<template slot-scope="scope">{{ scope.row.batch }}</template> <template slot-scope="scope">{{ scope.row.batch }}</template>
</el-table-column> </el-table-column>
@ -68,7 +69,6 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="关联的订单" name="1"> <el-tab-pane label="关联的订单" name="1">
<el-table <el-table
:data="orderlist" :data="orderlist"
@ -78,7 +78,7 @@
highlight-current-row highlight-current-row
height="460" height="460"
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50"/>
<el-table-column label="订单编号" show-overflow-tooltip> <el-table-column label="订单编号" show-overflow-tooltip>
<template slot-scope="scope">{{ scope.row.number }}</template> <template slot-scope="scope">{{ scope.row.number }}</template>
@ -86,22 +86,26 @@
<el-table-column label="客户" show-overflow-tooltip> <el-table-column label="客户" show-overflow-tooltip>
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.customer_.name scope.row.customer_.name
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="所属合同" show-overflow-tooltip> <el-table-column label="所属合同" show-overflow-tooltip>
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.contract_.name scope.row.contract_.name
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="产品名称" show-overflow-tooltip> <el-table-column label="产品名称" show-overflow-tooltip>
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.product_.name scope.row.product_.name
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="产品型号" show-overflow-tooltip> <el-table-column label="产品型号" show-overflow-tooltip>
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.product_.specification scope.row.product_.specification
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="产品数量"> <el-table-column label="产品数量">
<template slot-scope="scope">{{ scope.row.count }}</template> <template slot-scope="scope">{{ scope.row.count }}</template>
@ -109,12 +113,14 @@
<el-table-column label="交货日期"> <el-table-column label="交货日期">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.delivery_date scope.row.delivery_date
}}</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_time scope.row.create_time
}}</template> }}
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
@ -127,7 +133,7 @@
style="width: 100%" style="width: 100%"
height="460" height="460"
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50"/>
<el-table-column label="任务编号"> <el-table-column label="任务编号">
<template slot-scope="scope">{{ scope.row.number }}</template> <template slot-scope="scope">{{ scope.row.number }}</template>
@ -135,12 +141,14 @@
<el-table-column label="订单编号"> <el-table-column label="订单编号">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.order_.number scope.row.order_.number
}}</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.order_.contract_.number scope.row.order_.contract_.number
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="生产数量"> <el-table-column label="生产数量">
@ -155,7 +163,8 @@
<el-table-column label="交付截止时间"> <el-table-column label="交付截止时间">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.order_.delivery_date scope.row.order_.delivery_date
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="是否生成子计划"> <el-table-column label="是否生成子计划">
@ -167,7 +176,8 @@
<el-table-column label="创建时间"> <el-table-column label="创建时间">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.create_time scope.row.create_time
}}</template> }}
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
@ -184,7 +194,7 @@
style="width: 100%" style="width: 100%"
height="460" height="460"
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50"/>
<el-table-column label="玻璃编号"> <el-table-column label="玻璃编号">
<template slot-scope="scope">{{ scope.row.number }}</template> <template slot-scope="scope">{{ scope.row.number }}</template>
@ -196,16 +206,17 @@
<el-table-column label="状态"> <el-table-column label="状态">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
actstate_[scope.row.act_state] actstate_[scope.row.act_state]
}}</template> }}
</template>
</el-table-column> </el-table-column>
<el-table-column label="仓库"> <el-table-column label="仓库">
<template slot-scope="scope" v-if="scope.row.warehouse_">{{ <template slot-scope="scope" v-if="scope.row.warehouse_">{{
scope.row.warehouse_.name scope.row.warehouse_.name
}}</template> }}
</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="装箱单" name="5" v-if="this.type == 1"> <el-tab-pane label="装箱单" name="5" v-if="this.type == 1">
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"> <el-button type="primary" icon="el-icon-plus" @click="handleCreate">
新增装箱单 新增装箱单
@ -218,43 +229,36 @@
style="width: 100%" style="width: 100%"
height="460" height="460"
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50"/>
<el-table-column label="名称"> <el-table-column label="名称">
<template slot-scope="scope">{{ scope.row.name }}</template> <template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column> </el-table-column>
<el-table-column label="单位"> <el-table-column label="单位">
<template slot-scope="scope">{{ scope.row.unit }}</template> <template slot-scope="scope">{{ scope.row.unit }}</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.count}}</template>
scope.row.count </el-table-column>
}}</template> <el-table-column
align="center"
label="操作"
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> </el-table-column>
<el-table-column
align="center"
label="操作"
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>
</el-table> </el-table>
<el-dialog <el-dialog
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
@ -266,29 +270,30 @@
:model="packitem" :model="packitem"
label-width="100px" label-width="100px"
label-position="right" label-position="right"
:rules="rule1" :rules="rule1"
> >
<el-form-item label="物料" <el-form-item label="物料"
prop="material" prop="material"
> >
<el-select v-model="packitem.material" @change="selectmaterial" > <el-select v-model="packitem.material" @change="selectmaterial">
<el-option <el-option
v-for="item in materialoptions" v-for="item in materialoptions"
:key="item.id" :key="item.id"
:value="item.id"
:label="item.name" :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-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="名称" prop="name"> <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>
<el-form-item label="单位" prop="unit"> <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>
<el-form-item label="型号" prop="specification"> <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>
<el-form-item label="数量" prop="count"> <el-form-item label="数量" prop="count">
<el-input-number <el-input-number
@ -309,9 +314,12 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="text-align: right"> <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> <el-button type="primary" @click="confirm('Form')">确认</el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -322,100 +330,101 @@
</template> </template>
<script> <script>
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import vueJsonEditor from "vue-json-editor"; import vueJsonEditor from "vue-json-editor";
import { upUrl, upHeaders } from "@/api/file"; import {upUrl, upHeaders} from "@/api/file";
import { getProductionplanList } from "@/api/pm"; import {getProductionplanList} from "@/api/pm";
import { getmaterialbatchList } from "@/api/inm"; import {getmaterialbatchList} from "@/api/inm";
import { getOrderList } from "@/api/sam"; import {getOrderList} from "@/api/sam";
import { getMaterial,getpackitemList,createpackitem,updatepackitem,deletepackitem,getMaterialList } from "@/api/mtm"; import {
import { getwproductList } from "@/api/wpm"; getMaterial,
getpackitemList,
createpackitem,
updatepackitem,
deletepackitem,
getMaterialList
} from "@/api/mtm";
import {getwproductList} from "@/api/wpm";
import { upFile } from "@/api/file"; import {upFile} from "@/api/file";
import { genTree } from "@/utils"; import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
const defaultpackitem = {
name:"", const defaultpackitem = {
unit:"", name: "",
specification:"", unit: "",
specification: "",
}; };
export default { export default {
components: { Pagination, vueJsonEditor, Treeselect }, components: {Pagination, vueJsonEditor, Treeselect},
data() { data() {
return { return {
materialdetail: "", materialdetail: "",
orderlist: [], orderlist: [],
wproductList: [], wproductList: [],
productionplanList: [], productionplanList: [],
InventoryList: [], InventoryList: [],
activeName: "3", activeName: "3",
packitem:defaultpackitem, packitem: defaultpackitem,
dialogVisible: false, dialogVisible: false,
dialogType: "new", dialogType: "new",
pickList:[], pickList: [],
materialoptions:[], materialoptions: [],
actstate_: { actstate_: {
6: "待复检", 6: "待复检",
10: "操作进行中", 10: "操作进行中",
20: "待检验", 20: "待检验",
30: "已合格", 30: "已合格",
40: "库存中", 40: "库存中",
50: "不合格", 50: "不合格",
60: "待成品检验", 60: "待成品检验",
8: "操作准备中", 8: "操作准备中",
26: "待夹层检验", 26: "待夹层检验",
70: "报废", 70: "报废",
}, },
rule1: { rule1: {
name: [{required: true, message: "请输入名称", trigger: "blur"}], name: [{required: true, message: "请输入名称", trigger: "blur"}],
unit: [{required: true, message: "请输入单位", trigger: "blur"}], unit: [{required: true, message: "请输入单位", trigger: "blur"}],
}, },
}; };
},
computed: {},
watch: {},
created() {
this.material = this.$route.params.id;
this.type = this.$route.params.type;
this.getMaterialist()
this.getMaterial();
this.getpickList();
this.getOrderList();
this.getplanList();
this.getmaterialbatchList();
this.getwproductList();
},
methods: {
//新增装箱单
getMaterialist()
{
getMaterialList({ pageoff: true,type:3 }).then((response) => {
if (response.data) {
this.materialoptions = response.data;
}
});
}, },
computed: {},
watch: {},
created() {
this.material = this.$route.params.id;
this.type = this.$route.params.type;
this.getMaterialist();
this.getMaterial();
this.getpickList();
this.getOrderList();
this.getplanList();
this.getmaterialbatchList();
this.getwproductList();
},
methods: {
//新增装箱单
getMaterialist() {
getMaterialList({pageoff: true, type: 3}).then((response) => {
if (response.data) {
this.materialoptions = response.data;
}
});
},
selectmaterial(selval){ selectmaterial(selval) {
getMaterial(selval).then((response) => { getMaterial(selval).then((response) => {
if (response.data) { if (response.data) {
this.packitem.name = response.data.name; this.packitem.name = response.data.name;
this.packitem.unit = response.data.unit; this.packitem.unit = response.data.unit;
this.packitem.specification = response.data.specification; this.packitem.specification = response.data.specification;
}
});
},
handleCreate() {
}
});
},
handleCreate() {
this.packitem = Object.assign({}, defaultpackitem); this.packitem = Object.assign({}, defaultpackitem);
this.dialogType = "new"; this.dialogType = "new";
this.dialogVisible = true; this.dialogVisible = true;
@ -431,6 +440,7 @@ handleCreate() {
this.$refs["Form"].clearValidate(); this.$refs["Form"].clearValidate();
}); });
}, },
handleDelete(scope) { handleDelete(scope) {
this.$confirm("确认删除?", "警告", { this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认", confirmButtonText: "确认",
@ -446,6 +456,7 @@ handleCreate() {
console.error(err); console.error(err);
}); });
}, },
async confirm(form) { async confirm(form) {
this.$refs[form].validate((valid) => { this.$refs[form].validate((valid) => {
if (valid) { if (valid) {
@ -459,7 +470,7 @@ handleCreate() {
} }
}); });
} else { } else {
this.packitem.product=this.material; this.packitem.product = this.material;
createpackitem(this.packitem).then((res) => { createpackitem(this.packitem).then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
this.getpickList(); this.getpickList();
@ -474,56 +485,57 @@ handleCreate() {
}); });
}, },
getpickList() getpickList() {
{ getpackitemList({product: this.material, page: 0}).then((response) => {
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) {
this.materialdetail = response.data; //物料基本信息
}
});
},
getOrderList() {
getOrderList({ material: this.material, page: 0 }).then((response) => {
if (response.data) {
this.orderlist = response.data; //物料关联的订单
}
});
},
getplanList() {
getProductionplanList({ material: this.material, page: 0 }).then(
(response) => {
if (response.data) { if (response.data) {
this.productionplanList = response.data; //物料关联计划 this.pickList = response.data; //zhuangxiang信息
} }
} });
); },
},
getmaterialbatchList() { getMaterial() {
getmaterialbatchList({ material: this.material, page: 0 }).then( getMaterial(this.material).then((response) => {
(response) => {
if (response.data) { if (response.data) {
this.InventoryList = response.data; // debugger;
this.materialdetail = response.data; //物料基本信息
} }
} });
); },
getOrderList() {
getOrderList({material: this.material, page: 0}).then((response) => {
if (response.data) {
this.orderlist = response.data; //物料关联的订单
}
});
},
getplanList() {
getProductionplanList({material: this.material, page: 0}).then(
(response) => {
if (response.data) {
this.productionplanList = response.data; //物料关联计划
}
}
);
},
getmaterialbatchList() {
getmaterialbatchList({material: this.material, page: 0}).then(
(response) => {
if (response.data) {
this.InventoryList = response.data;
}
}
);
},
getwproductList() {
getwproductList({material: this.material, page: 0}).then((response) => {
if (response.data) {
this.wproductList = response.data; //半成品
}
});
},
}, },
getwproductList() { };
getwproductList({ material: this.material, page: 0 }).then((response) => {
if (response.data) {
this.wproductList = response.data; //半成品
}
});
},
},
};
</script> </script>

View File

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

View File

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

View File

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

View File

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

View File

@ -112,6 +112,10 @@
@click="handleRecordDetail(scope)" @click="handleRecordDetail(scope)"
>查看 >查看
</el-link> </el-link>
<el-link
@click="handleRecordExport(scope)"
>导出
</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -155,11 +159,11 @@
</div> </div>
</template> </template>
<script> <script>
import {getfifodetailList} from "@/api/inm"; // import {getfifodetailList} from "@/api/inm";
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import {mtest, getwproductList} from "@/api/wpm"; import {mtest, getwproductList} from "@/api/wpm";
import {getrecordformList, getrffieldList} from "@/api/mtm"; // import {getrecordformList, getrffieldList} from "@/api/mtm";
import {getTestRecord, getTestRecordItem} from "@/api/qm"; import {getTestRecord, getTestRecordItem,getTestRecordExport} from "@/api/qm";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
export default { 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> </script>

View File

@ -48,6 +48,7 @@
<el-table-column align="center" label="操作"> <el-table-column align="center" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link @click="handleRecordDetail(scope)">查看</el-link> <el-link @click="handleRecordDetail(scope)">查看</el-link>
<el-link @click="handleRecordExport(scope)">导出</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -90,8 +91,7 @@
<script> <script>
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import {getProductionplan} from "@/api/pm"; import {getProductionplan} from "@/api/pm";
import {getTestRecord, getTestRecordItem} from "@/api/qm"; import {getTestRecord, getTestRecordItem,getTestRecordExport} from "@/api/qm";
export default { export default {
data() { data() {
return { 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> </script>

View File

@ -391,7 +391,7 @@
//不合格玻璃审理单查看 //不合格玻璃审理单查看
handledetailbhg(scope) { 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" width="220px"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['customfield_update'])"
@click="handleEdit(scope)" @click="handleEdit(scope)"
>编辑
</el-link
> >
编辑
</el-link>
<el-link <el-link
v-if="checkPermission(['customfield_delete'])"
type="danger" type="danger"
@click="handleDeleteCustomfield(scope)" @click="handleDeleteCustomfield(scope)"
>删除
</el-link
> >
删除
</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -1,19 +1,22 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-card> <el-card>
<div style="margin-top: 2px">
<div style="margin-top: 2px"> <el-button
<el-button type="primary" icon="el-icon-plus" @click="handleCreate" type="primary"
>新增</el-button icon="el-icon-plus"
> @click="handleCreate"
</div> >
新增
</el-button>
</div>
</el-card> </el-card>
<el-card style="margin-top: 2px"> <el-card style="margin-top: 2px">
<el-table <el-table
:data="wftransitionList" :data="wftransitionList"
style="width: 100%" style="width: 100%"
> >
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50"/>
<el-table-column width="180" label="名称"> <el-table-column width="180" label="名称">
<template slot-scope="scope">{{ scope.row.name }}</template> <template slot-scope="scope">{{ scope.row.name }}</template>
</el-table-column> </el-table-column>
@ -31,32 +34,27 @@
<span v-if="scope.row.destination_state_">{{scope.row.destination_state_.name}}</span> <span v-if="scope.row.destination_state_">{{scope.row.destination_state_.name}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="180" label="创建时间"> <el-table-column width="180" label="创建时间">
<template slot-scope="scope">{{ scope.row.create_time }}</template> <template slot-scope="scope">{{ scope.row.create_time }}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
label="操作" label="操作"
width="220px" width="220px"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link @click="handleEdit(scope)">
编辑
</el-link>
<el-link <el-link
v-if="checkPermission(['wftransition_update'])"
@click="handleEdit(scope)"
>编辑</el-link
>
<el-link
v-if="checkPermission(['wftransition_delete'])"
type="danger" type="danger"
@click="handleDelete(scope)" @click="handleDelete(scope)"
>删除</el-link
> >
删除
</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-dialog <el-dialog
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
@ -70,13 +68,12 @@
:rules="rule1" :rules="rule1"
> >
<el-form-item label="名称" prop="name"> <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>
<el-form-item label="定时器(单位秒)" prop="timer"> <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>
<el-form-item label="源状态" prop="source_state"> <el-form-item label="源状态" prop="source_state">
<el-select v-model="wftransition.source_state" placeholder="请选择" style="width:100%"> <el-select v-model="wftransition.source_state" placeholder="请选择" style="width:100%">
<el-option <el-option
v-for="item in stateoptions" v-for="item in stateoptions"
@ -86,8 +83,8 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="目的状态" prop="destination_state"> <el-form-item label="目的状态" prop="destination_state">
<el-select v-model="wftransition.destination_state" placeholder="请选择" style="width:100%"> <el-select v-model="wftransition.destination_state" placeholder="请选择" style="width:100%">
<el-option <el-option
v-for="item in stateoptions" v-for="item in stateoptions"
:key="item.value" :key="item.value"
@ -104,21 +101,19 @@
lang="zh" lang="zh"
/> />
</el-form-item> </el-form-item>
<el-form-item label="属性类型" prop="attribute_type"> <el-form-item label="属性类型" prop="attribute_type">
<el-select style="width: 100%" v-model="wftransition.attribute_type" placeholder="请选择"> <el-select style="width: 100%" v-model="wftransition.attribute_type" placeholder="请选择">
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否校验必填" prop="field_require_check"> <el-form-item label="是否校验必填" prop="field_require_check">
<el-switch v-model="wftransition.field_require_check"></el-switch> <el-switch v-model="wftransition.field_require_check"></el-switch>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div style="text-align: right"> <div style="text-align: right">
<el-button type="danger" @click="dialogVisible = false">取消</el-button> <el-button type="danger" @click="dialogVisible = false">取消</el-button>
@ -128,28 +123,35 @@
</div> </div>
</template> </template>
<script> <script>
import {getWfStateList, getWfTransitionList, createWfTransition,updateWfTransition,deleteWfTransition } from "@/api/workflow"; import {
import checkPermission from "@/utils/permission"; getWfStateList,
import vueJsonEditor from 'vue-json-editor' getWfTransitionList,
import { genTree } from "@/utils" createWfTransition,
const defaultwftransition = { updateWfTransition,
name: "", deleteWfTransition
}; } from "@/api/workflow";
export default { import checkPermission from "@/utils/permission";
components: { vueJsonEditor }, import vueJsonEditor from 'vue-json-editor'
name: "TST", import {genTree} from "@/utils"
props: ["ID"],
data() { const defaultwftransition = {
return { name: "",
wftransition: defaultwftransition, };
condition_expression:false, export default {
/*wftransitionList: { components: {vueJsonEditor},
count:0 name: "TST",
},*/ props: ["ID"],
wftransitionList:[], data() {
lable:'', return {
options_:[], wftransition: defaultwftransition,
options: [{ condition_expression: false,
/*wftransitionList: {
count:0
},*/
wftransitionList: [],
lable: '',
options_: [],
options: [{
value: 1, value: 1,
label: '同意' label: '同意'
}, { }, {
@ -160,108 +162,108 @@ export default {
label: '其他' label: '其他'
}], }],
stateoptions:[], stateoptions: [],
dialogVisible: false, dialogVisible: false,
dialogType: "new", dialogType: "new",
rule1: { rule1: {
name: [{ required: true, message: "请输入", trigger: "blur" }], name: [{required: true, message: "请输入", trigger: "blur"}],
}, },
}; };
},
created() {
this.getWfStateList();
this.getList();
},
methods: {
checkPermission,
getList() {
getWfTransitionList(this.ID).then((response) => {
if (response.data) {
this.wftransitionList = response.data;
}
});
},
getWfStateList() {
getWfStateList(this.ID).then((response) => {
if (response.data) {
this.stateoptions = genTree(response.data);
}
});
}, },
created() {
handleCreate() {
this.wftransition = Object.assign({}, defaultwftransition);
this.dialogType = "new";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleEdit(scope) { this.getWfStateList();
this.wftransition = Object.assign({}, scope.row); // copy obj this.getList();
this.dialogType = "edit";
this.dialogVisible = true;
// this.wftransition.condition_expression = JSON.stringify(scope.row.condition_expression)
// this.$nextTick(() => {
// this.$refs["Form"].clearValidate();
// });
}, },
async confirm(form) { methods: {
this.$refs[form].validate((valid) => { checkPermission,
if (valid) {
const isEdit = this.dialogType === "edit"; getList() {
if (isEdit) {
updateWfTransition(this.wftransition.id, this.wftransition).then((res) => { getWfTransitionList(this.ID).then((response) => {
if (res.code >= 200) {
this.getList(); if (response.data) {
this.dialogVisible = false; this.wftransitionList = response.data;
this.$message.success("成功");
}
});
} else {
this.wftransition.workflow=this.ID;
createWfTransition(this.wftransition).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
} }
} else {
return false;
}
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
})
.then(async () => {
await deleteWfTransition(scope.row.id);
this.getList();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
}); });
},
getWfStateList() {
getWfStateList(this.ID).then((response) => {
if (response.data) {
this.stateoptions = genTree(response.data);
}
});
},
handleCreate() {
this.wftransition = Object.assign({}, defaultwftransition);
this.dialogType = "new";
this.dialogVisible = true;
this.$nextTick(() => {
this.$refs["Form"].clearValidate();
});
},
handleEdit(scope) {
this.wftransition = Object.assign({}, scope.row); // copy obj
this.dialogType = "edit";
this.dialogVisible = true;
// this.wftransition.condition_expression = JSON.stringify(scope.row.condition_expression)
// this.$nextTick(() => {
// this.$refs["Form"].clearValidate();
// });
},
async confirm(form) {
this.$refs[form].validate((valid) => {
if (valid) {
const isEdit = this.dialogType === "edit";
if (isEdit) {
updateWfTransition(this.wftransition.id, this.wftransition).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
} else {
this.wftransition.workflow = this.ID;
createWfTransition(this.wftransition).then((res) => {
if (res.code >= 200) {
this.getList();
this.dialogVisible = false;
this.$message.success("成功");
}
});
}
} else {
return false;
}
});
},
handleDelete(scope) {
this.$confirm("确认删除?", "警告", {
confirmButtonText: "确认",
cancelButtonText: "取消",
type: "error",
})
.then(async () => {
await deleteWfTransition(scope.row.id);
this.getList();
this.$message.success("成功");
})
.catch((err) => {
console.error(err);
});
},
}, },
}, };
};
</script> </script>

View File

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

View File

@ -1544,33 +1544,40 @@
params.is_testok = that.params.is_testok; params.is_testok = that.params.is_testok;
params.record_data = that.params.record_data; params.record_data = that.params.record_data;
params.token = data.token; params.token = data.token;
let text = '确定以操作员'+data.name+'身份提交?';
if (data.token !== '' && data.token !== null && data.token !== undefined) { if (data.token !== '' && data.token !== null && data.token !== undefined) {
putTestRecordItem(id, params).then((res) => { this.$confirm(text, '提示', {
if (res.code >= 200) { confirmButtonText: '确定',
subTestRecordItem(id, params).then((res) => { cancelButtonText: '取消',
debugger; type: 'warning'
that.limitedPhoto = false; }).then(() => {
if (res.code >= 200) { that.limitedPhoto = false;
that.recordVisible = false; putTestRecordItem(id, params).then((res) => {
that.limitedReview = false; if (res.code >= 200) {
that.limitedCheckRecord = false; subTestRecordItem(id, params).then((res) => {
that.getList(); if (res.code >= 200) {
that.getList2(); that.recordVisible = false;
that.getList1(); that.limitedReview = false;
that.getList3(); that.limitedCheckRecord = false;
that.refreshRecord(); that.getList();
} else { that.getList2();
that.$message.error(res.msg) that.getList1();
} that.getList3();
}).catch(() => { that.refreshRecord();
that.limitedPhoto = false; } else {
}); that.$message.error(res.msg)
} else { }
that.$message.error(res.msg) }).catch(() => {});
} } else {
}).catch((err) => { that.$message.error(res.msg)
that.$message.error(err); }
}).catch((err) => {
that.$message.error(err);
});
}).catch(() => {
that.limitedPhoto = false;
}); });
} }
}, },

View File

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

View File

@ -288,16 +288,27 @@
<el-button type="primary" @click="putins"> </el-button> <el-button type="primary" @click="putins"> </el-button>
</div> </div>
</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="getMsgFormSon"
></faceLogin>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
// import {getOrderList} from "@/api/sam";
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import {getWarehouseList} from "@/api/inm"; import {getWarehouseList} from "@/api/inm";
import { getrecordformList, getrffieldList} from "@/api/mtm"; import { getrecordformList, getrffieldList} from "@/api/mtm";
// import {genTree} from "@/utils";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
import customForm from "@/components/customForm/index"; import customForm from "@/components/customForm/index";
import faceLogin from '@/components/faceLogin/review.vue';
import { import {
getwproductList, getwproductList,
wproductTest, wproductTest,
@ -315,12 +326,12 @@
const defaultetestitem = {}; const defaultetestitem = {};
export default { export default {
components: {Pagination, customForm}, components: {Pagination, customForm,faceLogin},
data() { data() {
return { return {
testitem: defaultetestitem, testitem: defaultetestitem,
form: {remark: "", warehouse: ""}, form: {remark: "", warehouse: ""},
form1: {}, submitForm: {},
wproductList: { wproductList: {
count: 0, count: 0,
}, },
@ -372,11 +383,13 @@
recordList: [], recordList: [],
recordformList: [], recordformList: [],
recordform: null, recordform: null,
submitFormId: null,
fifo_detail: "", fifo_detail: "",
listQueryrecordform: { listQueryrecordform: {
page: 0, page: 0,
}, },
hasPicture: false, hasPicture: false,
limitedPhoto: false,
outerVisible: false, outerVisible: false,
innerVisible: false, innerVisible: false,
dialogFormVisible: false, dialogFormVisible: false,
@ -680,12 +693,12 @@
//记录提交检查项目 //记录提交检查项目
recordSubmit(value) { recordSubmit(value) {
let that = this; // let that = this;
let id = value.id; this.submitFormId = value.id;
let params = {}; this.submitForm.record_data = value.record_data;
params.record_data = value.record_data; this.submitForm.is_testok = value.is_testok;
params.is_testok = value.is_testok; this.limitedPhoto = true;
putTestRecordItem(id, params) /*putTestRecordItem(id, params)
.then((res) => { .then((res) => {
if (res.code >= 200) { if (res.code >= 200) {
subTestRecordItem(id, params).then((res) => { subTestRecordItem(id, params).then((res) => {
@ -704,7 +717,7 @@
}) })
.catch((err) => { .catch((err) => {
this.$message.error(err); this.$message.error(err);
}); });*/
}, },
//第一次保存提交检查项目 //第一次保存提交检查项目
@ -712,6 +725,55 @@
this.outerVisible = false; this.outerVisible = false;
this.innerVisible = 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> </script>