0329
This commit is contained in:
parent
194b0f9731
commit
ad16a963e4
|
@ -153,13 +153,14 @@
|
|||
debugger;
|
||||
let video = document.getElementById('video');
|
||||
let stream = video.srcObject;
|
||||
console.log(stream);
|
||||
let tracks = stream.getTracks();
|
||||
this.$emit('close');
|
||||
tracks.forEach(track => {
|
||||
track.stop()
|
||||
});
|
||||
video.srcObject = null;
|
||||
this.video.srcObject.getTracks()[0].stop();
|
||||
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
@ -177,10 +178,6 @@
|
|||
</script>
|
||||
<style scoped>
|
||||
.faceLoginWrap{
|
||||
/*padding: 50px;*/
|
||||
/*width: 600px;*/
|
||||
/*height: 600px;*/
|
||||
/*background: #000000;*/
|
||||
margin:50px auto 0 auto;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
@ -194,7 +191,6 @@
|
|||
position: relative;
|
||||
width: 500px;
|
||||
height: 500px;
|
||||
/*background: #000000;*/
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,9 +11,9 @@ const getDefaultState = () => {
|
|||
count: {},
|
||||
perms: []
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const state = getDefaultState()
|
||||
const state = getDefaultState();
|
||||
|
||||
const mutations = {
|
||||
RESET_STATE: (state) => {
|
||||
|
@ -34,17 +34,17 @@ const mutations = {
|
|||
SET_COUNT: (state, count) => {
|
||||
state.count = count
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const actions = {
|
||||
// user login
|
||||
login({ commit }, userInfo) {
|
||||
const { username, password } = userInfo
|
||||
const { username, password } = userInfo;
|
||||
return new Promise((resolve, reject) => {
|
||||
login({ username: username.trim(), password: password }).then(response => {
|
||||
const { data } = response
|
||||
commit('SET_TOKEN', data.access)
|
||||
setToken(data.access)
|
||||
const { data } = response;
|
||||
commit('SET_TOKEN', data.access);
|
||||
setToken(data.access);
|
||||
resolve()
|
||||
|
||||
}).catch(error => {
|
||||
|
@ -57,22 +57,23 @@ const actions = {
|
|||
getInfo({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getInfo(state.token).then(response => {
|
||||
const { data } = response
|
||||
const { data } = response;
|
||||
sessionStorage.setItem('userId',data.id);
|
||||
if (!data) {
|
||||
reject('验证失败,重新登陆.')
|
||||
this.$router.push({name:'login',params:{}});
|
||||
reject('验证失败,重新登陆.');
|
||||
}
|
||||
|
||||
const { perms, name, avatar } = data
|
||||
const { perms, name, avatar } = data;
|
||||
|
||||
// perms must be a non-empty array
|
||||
if (!perms || perms.length <= 0) {
|
||||
reject('没有任何权限!')
|
||||
}
|
||||
|
||||
commit('SET_PERMS', perms)
|
||||
commit('SET_NAME', name)
|
||||
commit('SET_AVATAR', avatar)
|
||||
commit('SET_PERMS', perms);
|
||||
commit('SET_NAME', name);
|
||||
commit('SET_AVATAR', avatar);
|
||||
resolve(data)
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
|
@ -84,9 +85,9 @@ const actions = {
|
|||
logout({ commit, state }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
logout(state.token).then(() => {
|
||||
removeToken() // must remove token first
|
||||
resetRouter()
|
||||
commit('RESET_STATE')
|
||||
removeToken();// must remove token first
|
||||
resetRouter();
|
||||
commit('RESET_STATE');
|
||||
resolve()
|
||||
}).catch(error => {
|
||||
reject(error)
|
||||
|
|
|
@ -117,7 +117,21 @@
|
|||
<el-input v-model="vendor.address" placeholder="地址"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="供应物料" prop="material">
|
||||
<el-input v-model="vendor.material" placeholder="供应物料"/>
|
||||
<el-select
|
||||
v-model="vendor.material"
|
||||
style="width: 100%"
|
||||
filterable
|
||||
placeholder="请选择供应物料"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in materialList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!--<el-input v-model="vendor.material" placeholder="供应物料"/>-->
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="description">
|
||||
<el-input
|
||||
|
@ -136,6 +150,7 @@
|
|||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {getMaterialList} from "@/api/mtm";
|
||||
import {getpVendorList, createVendor, updateVendor, deleteVendor} from "@/api/vendor";
|
||||
// import {getUserList} from "@/api/user";
|
||||
import checkPermission from "@/utils/permission";
|
||||
|
@ -167,6 +182,7 @@
|
|||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
materialList: [],
|
||||
keeperOptions: [],
|
||||
listLoading: true,
|
||||
dialogVisible: false,
|
||||
|
@ -183,6 +199,7 @@
|
|||
watch: {},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getMaterial();
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
@ -197,6 +214,15 @@
|
|||
});
|
||||
},
|
||||
|
||||
getMaterial(){
|
||||
this.listLoading = true;
|
||||
getMaterialList({page:0}).then((response) => {
|
||||
if (response.data) {
|
||||
this.materialList = response.data;
|
||||
}
|
||||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
handleFilter() {
|
||||
this.listQuery.page = 1;
|
||||
this.getList();
|
||||
|
|
|
@ -266,6 +266,9 @@
|
|||
>
|
||||
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验员">
|
||||
<!--<template slot-scope="scope">{{}}</template>-->
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
|
@ -356,6 +359,9 @@
|
|||
<el-table-column label="子计划编号">
|
||||
<template slot-scope="scope">{{ scope.row.subproduction_plan_.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验员">
|
||||
<!--<template slot-scope="scope">{{}}</template>-->
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<el-span v-else>否</el-span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建人">
|
||||
<el-table-column label="操作人">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.create_by_.username}}
|
||||
</template>
|
||||
|
|
|
@ -3,13 +3,12 @@
|
|||
<el-card>
|
||||
<div slot="header" class="clearfix">
|
||||
<span>基本信息</span>
|
||||
|
||||
<el-button
|
||||
style="float: right; padding: 3px 0"
|
||||
@click="getWordText()"
|
||||
type="text"
|
||||
>查看作业指导书</el-button
|
||||
>
|
||||
>查看作业指导书
|
||||
</el-button>
|
||||
</div>
|
||||
<el-form
|
||||
ref="form"
|
||||
|
@ -23,10 +22,9 @@
|
|||
disabled="disabled"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="创建人">
|
||||
<el-form-item label="操作人">
|
||||
<el-input
|
||||
v-model="operationData.create_by_.username"
|
||||
v-model="operationData.user"
|
||||
disabled="disabled"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
@ -38,12 +36,13 @@
|
|||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
v-if="operationData.is_submited == false"
|
||||
type="primary"
|
||||
style="float: right"
|
||||
@click="handlesubmit()"
|
||||
v-if="operationData.is_submited == false"
|
||||
>提交本次操作</el-button
|
||||
>
|
||||
提交本次操作
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<!--
|
||||
<el-form-item label="边角料">
|
||||
|
@ -61,7 +60,12 @@
|
|||
</el-form-item>
|
||||
!-->
|
||||
<el-form-item v-if="operationData.use_scrap">
|
||||
<el-button type="primary" @click="scrapSubmit()">创建</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="scrapSubmit()"
|
||||
>
|
||||
创建
|
||||
</el-button>
|
||||
<el-button>取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -100,7 +104,7 @@
|
|||
height="230"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column
|
||||
prop="subproduction_plan_.number"
|
||||
label="子计划编号"
|
||||
|
@ -115,18 +119,18 @@
|
|||
width="170"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column prop="place" label="摆放位置"> </el-table-column>
|
||||
<el-table-column prop="place" label="摆放位置"></el-table-column>
|
||||
<el-table-column align="center" label="操作" width="100px" fixed="right">
|
||||
<template slot-scope="scope" >
|
||||
<template slot-scope="scope">
|
||||
<el-link type="primary" @click="handleupdatewproduct(scope)"
|
||||
>编辑</el-link
|
||||
>
|
||||
>编辑
|
||||
</el-link>
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])"
|
||||
type="danger"
|
||||
@click="handleDeletewproduct(scope)"
|
||||
>删除</el-link
|
||||
>
|
||||
>删除
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -143,16 +147,16 @@
|
|||
label-position="right"
|
||||
>
|
||||
<el-form-item label="位置" prop="place">
|
||||
<el-input v-model="wproductplace.place" placeholder="位置" />
|
||||
<el-input v-model="wproductplace.place" placeholder="位置"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogwproductplace = false"
|
||||
>取消</el-button
|
||||
>
|
||||
>取消
|
||||
</el-button>
|
||||
<el-button type="primary" @click="submitwproductplace"
|
||||
>确认</el-button
|
||||
>
|
||||
>确认
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
@ -183,7 +187,7 @@
|
|||
<el-tag v-if="scope.row.equip_.state === 40" type="danger">
|
||||
禁用
|
||||
</el-tag>
|
||||
<el-tag v-else type="success"> 合格 </el-tag>
|
||||
<el-tag v-else type="success"> 合格</el-tag>
|
||||
</div>
|
||||
<div v-else>
|
||||
<el-tag v-if="scope.row.equip_.state === 10" type="success">
|
||||
|
@ -211,8 +215,8 @@
|
|||
v-if="checkPermission(['warehouse_update'])"
|
||||
type="danger"
|
||||
@click="handleDeletequip(scope)"
|
||||
>删除</el-link
|
||||
>
|
||||
>删除
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -248,8 +252,8 @@
|
|||
v-if="checkPermission(['warehouse_update'])"
|
||||
type="primary"
|
||||
@click="handlerecord(scope)"
|
||||
>填写表单</el-link
|
||||
>
|
||||
>填写表单
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -268,7 +272,7 @@
|
|||
v-if="item.field_type === 'string'"
|
||||
:label="item.field_name"
|
||||
>
|
||||
<el-input v-model="item.field_value" placeholder="请输入" />
|
||||
<el-input v-model="item.field_value" placeholder="请输入"/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-else-if="item.field_type === 'int'"
|
||||
|
@ -357,11 +361,9 @@
|
|||
</el-form>
|
||||
<span slot="footer">
|
||||
<el-button type="danger" @click="dialogVisibleForm = false"
|
||||
>取消</el-button
|
||||
>
|
||||
>取消</el-button>
|
||||
<el-button type="primary" @click="recordconfirm()"
|
||||
>提交</el-button
|
||||
>
|
||||
>提交</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
@ -377,8 +379,8 @@
|
|||
style="float: right; padding: 3px 0"
|
||||
type="text"
|
||||
@click="cjllclick()"
|
||||
>从车间领料</el-button
|
||||
>
|
||||
>从车间领料
|
||||
</el-button>
|
||||
</div>
|
||||
<template>
|
||||
<el-table
|
||||
|
@ -395,20 +397,20 @@
|
|||
label="子计划编号"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column prop="batch" label="物料批次"> </el-table-column>
|
||||
<el-table-column prop="batch" label="物料批次"></el-table-column>
|
||||
<el-table-column prop="material_.name" label="物料名称">
|
||||
</el-table-column>
|
||||
<el-table-column prop="material_.unit" label="物料单位">
|
||||
</el-table-column>
|
||||
<el-table-column prop="count" label="消耗数量"> </el-table-column>
|
||||
<el-table-column prop="count" label="消耗数量"></el-table-column>
|
||||
<el-table-column align="center" label="操作" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])"
|
||||
type="danger"
|
||||
@click="handleDeleteinput(scope)"
|
||||
>删除</el-link
|
||||
>
|
||||
>删除
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -426,22 +428,25 @@
|
|||
max-height="400"
|
||||
ref="multipleTable"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="子计划编号">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.subproduction_plan_.number
|
||||
}}</template>
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.material_.name
|
||||
}}</template>
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料单位">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.material_.unit
|
||||
}}</template>
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料批次">
|
||||
<template slot-scope="scope">{{ scope.row.batch }}</template>
|
||||
|
@ -475,11 +480,11 @@
|
|||
</el-table>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogTablepick = false"
|
||||
>取消</el-button
|
||||
>
|
||||
>取消
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlepicks()"
|
||||
>提交</el-button
|
||||
>
|
||||
>提交
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
@ -493,8 +498,8 @@
|
|||
style="float: right; padding: 3px 0"
|
||||
type="text"
|
||||
@click="dialogTableoutput = true"
|
||||
>选择产出</el-button
|
||||
>
|
||||
>选择产出
|
||||
</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
:data="outputData"
|
||||
|
@ -515,7 +520,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="material_.unit" label="物料单位">
|
||||
</el-table-column>
|
||||
<el-table-column prop="count" label="产出数量"> </el-table-column>
|
||||
<el-table-column prop="count" label="产出数量"></el-table-column>
|
||||
</el-table>
|
||||
<el-dialog
|
||||
title="产出物料"
|
||||
|
@ -531,32 +536,34 @@
|
|||
max-height="400"
|
||||
ref="multipleTables"
|
||||
>
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column type="index" width="50" />
|
||||
<el-table-column type="selection" width="55"></el-table-column>
|
||||
<el-table-column type="index" width="50"/>
|
||||
|
||||
<el-table-column label="子计划编号">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.subproduction_plan_.number
|
||||
}}</template>
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料名称">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.material_.name
|
||||
}}</template>
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="物料单位">
|
||||
<template slot-scope="scope">{{
|
||||
scope.row.material_.unit
|
||||
}}</template>
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="计划/产出/合格">
|
||||
<template slot-scope="scope"
|
||||
>{{ scope.row.count }}/{{ scope.row.count_real }}/{{
|
||||
scope.row.count_ok
|
||||
}}</template
|
||||
>
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="本操作产出数量" width="140px">
|
||||
<template slot-scope="scope">
|
||||
<el-form :model="scope.row" widht="100px">
|
||||
|
@ -592,11 +599,11 @@
|
|||
</el-table>
|
||||
<div style="text-align: right">
|
||||
<el-button type="danger" @click="dialogTableoutput = false"
|
||||
>取消</el-button
|
||||
>
|
||||
>取消
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handleoutputs()"
|
||||
>提交</el-button
|
||||
>
|
||||
>提交
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
|
@ -606,7 +613,6 @@
|
|||
<div slot="header" class="clearfix">
|
||||
<span>工具工装</span>
|
||||
</div>
|
||||
|
||||
<el-table
|
||||
:data="tool"
|
||||
border
|
||||
|
@ -624,18 +630,31 @@
|
|||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<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"
|
||||
@close="closeDialog"
|
||||
></faceLogin>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<style scoped>
|
||||
.word-wrap {
|
||||
.word-wrap {
|
||||
padding: 25px;
|
||||
}
|
||||
.box-card {
|
||||
}
|
||||
|
||||
.box-card {
|
||||
height: 300px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
import {
|
||||
<script>
|
||||
import {
|
||||
getoperation,
|
||||
createoperation,
|
||||
getoperationwproductList,
|
||||
|
@ -657,15 +676,16 @@ import {
|
|||
createOutputs,
|
||||
deleteOperationeinput,
|
||||
wproductPlace,
|
||||
} from "@/api/wpm";
|
||||
import mammoth from "mammoth";
|
||||
import { getrffieldList, 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
|
||||
} from "@/api/wpm";
|
||||
import mammoth from "mammoth";
|
||||
import {getrffieldList, 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 faceLogin from '@/components/faceLogin/review.vue';
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
export default {
|
||||
components: {Pagination, faceLogin},
|
||||
inject: ["reload"],
|
||||
data() {
|
||||
return {
|
||||
|
@ -685,15 +705,17 @@ export default {
|
|||
40: "禁用",
|
||||
},
|
||||
scrap: [
|
||||
{ lable: "使用", value: true },
|
||||
{ lable: "不使用", value: false },
|
||||
{lable: "使用", value: true},
|
||||
{lable: "不使用", value: false},
|
||||
],
|
||||
listQueryfield: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
wproductplace: {},
|
||||
operationData: "",
|
||||
operationData: {
|
||||
user: "",
|
||||
},
|
||||
scrapData: {},
|
||||
dialogVisibleForm: false,
|
||||
tableForm: {
|
||||
|
@ -711,17 +733,13 @@ export default {
|
|||
count: 0,
|
||||
name: "",
|
||||
},
|
||||
listQueryfield: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
highoptions: [
|
||||
{ value: 1, label: "<" },
|
||||
{ value: 2, label: "<=" },
|
||||
{value: 1, label: "<"},
|
||||
{value: 2, label: "<="},
|
||||
],
|
||||
lowoptions: [
|
||||
{ value: 1, label: ">" },
|
||||
{ value: 2, label: ">=" },
|
||||
{value: 1, label: ">"},
|
||||
{value: 2, label: ">="},
|
||||
],
|
||||
highoptionss_: {
|
||||
1: "<",
|
||||
|
@ -775,6 +793,7 @@ export default {
|
|||
},
|
||||
],
|
||||
formID: "",
|
||||
limitedPhoto: false,
|
||||
dialogTablepick: false,
|
||||
dialogTableoutput: false,
|
||||
picks: {},
|
||||
|
@ -857,7 +876,7 @@ export default {
|
|||
this.drawer = true;
|
||||
},
|
||||
readbook() {
|
||||
gettechdocList({ operation: this.id, page: 0, enabled: true }).then(
|
||||
gettechdocList({operation: this.id, page: 0, enabled: true}).then(
|
||||
(response) => {
|
||||
if (response.data) {
|
||||
this.techdocList = response.data;
|
||||
|
@ -872,6 +891,11 @@ export default {
|
|||
getoperation(this.id).then((response) => {
|
||||
if (response.data) {
|
||||
this.operationData = response.data;
|
||||
if (response.data.is_submited) {
|
||||
this.operationData.user = response.data.create_by_.name;
|
||||
} else {
|
||||
this.operationData.user = '';
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -888,7 +912,7 @@ export default {
|
|||
},
|
||||
//操作使用的半成品
|
||||
getpwpList() {
|
||||
getoperationwproductList({ operation: this.id, page: 0 }).then(
|
||||
getoperationwproductList({operation: this.id, page: 0}).then(
|
||||
(response) => {
|
||||
if (response.data) {
|
||||
this.operationwpData = response.data;
|
||||
|
@ -928,7 +952,7 @@ export default {
|
|||
},
|
||||
//操作设备
|
||||
getequList() {
|
||||
getequList({ operation: this.id, page: 0 }).then((response) => {
|
||||
getequList({operation: this.id, page: 0}).then((response) => {
|
||||
if (response.data) {
|
||||
this.equData = response.data;
|
||||
}
|
||||
|
@ -954,7 +978,7 @@ export default {
|
|||
},
|
||||
//操作自定义表
|
||||
getrecordLists() {
|
||||
getrecordList({ operation: this.id, page: 0, enabled: true }).then(
|
||||
getrecordList({operation: this.id, page: 0, enabled: true}).then(
|
||||
(response) => {
|
||||
if (response.data) {
|
||||
this.recordData = response.data;
|
||||
|
@ -978,7 +1002,7 @@ export default {
|
|||
|
||||
//工序工装列表
|
||||
gettoolList() {
|
||||
gettoolList({ operation: this.id, page: 0 }).then((response) => {
|
||||
gettoolList({operation: this.id, page: 0}).then((response) => {
|
||||
if (response.data) {
|
||||
this.tool = response.data;
|
||||
}
|
||||
|
@ -1013,7 +1037,7 @@ export default {
|
|||
|
||||
//操作消耗物料列表
|
||||
getinputLists() {
|
||||
getinputList({ operation: this.id, page: 0 }).then((response) => {
|
||||
getinputList({operation: this.id, page: 0}).then((response) => {
|
||||
if (response.data) {
|
||||
this.inputData = response.data;
|
||||
}
|
||||
|
@ -1025,7 +1049,7 @@ export default {
|
|||
|
||||
//从车间领料
|
||||
getwmaterialList() {
|
||||
getwmaterialList({ operation: this.id, page: 0 }).then((response) => {
|
||||
getwmaterialList({operation: this.id, page: 0}).then((response) => {
|
||||
if (response.data) {
|
||||
this.wmaterialData = response.data;
|
||||
}
|
||||
|
@ -1087,7 +1111,7 @@ export default {
|
|||
|
||||
//操作产出物料列表
|
||||
getoutputLists() {
|
||||
getoutputList({ operation: this.id, page: 0 }).then((response) => {
|
||||
getoutputList({operation: this.id, page: 0}).then((response) => {
|
||||
if (response.data) {
|
||||
this.outputData = response.data;
|
||||
}
|
||||
|
@ -1095,7 +1119,7 @@ export default {
|
|||
},
|
||||
//产出物料选择
|
||||
getprogressList() {
|
||||
getprogressList({ operation: this.id, page: 0, type: 2 }).then(
|
||||
getprogressList({operation: this.id, page: 0, type: 2}).then(
|
||||
(response) => {
|
||||
if (response.data) {
|
||||
this.tprogressData = response.data;
|
||||
|
@ -1144,10 +1168,8 @@ export default {
|
|||
|
||||
//提交本次操作
|
||||
handlesubmit() {
|
||||
|
||||
|
||||
if(this.inputData=="")
|
||||
{
|
||||
this.limitedPhoto = true;
|
||||
/* if (this.inputData == "") {
|
||||
this.$confirm("没有消耗物料确定提交吗?", "提示", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
|
@ -1155,23 +1177,79 @@ export default {
|
|||
})
|
||||
.then(async () => {
|
||||
await submitOperation(this.id);
|
||||
this.$router.push({ name: "operation" });
|
||||
this.$router.push({name: "operation"});
|
||||
this.$message.success("操作提交成功!");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
submitOperation(this.id).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.$router.push({ name: "operation" });
|
||||
this.$router.push({name: "operation"});
|
||||
this.$message.success("操作提交成功!");
|
||||
}
|
||||
});
|
||||
}
|
||||
}*/
|
||||
|
||||
},
|
||||
/*关闭相机*/
|
||||
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;
|
||||
},
|
||||
};
|
||||
//获取人脸数据
|
||||
getMsgFormSon(data) {
|
||||
let that = this;
|
||||
that.operationData.user = data.name;
|
||||
if (data.token !== '' && data.token !== null && data.token !== undefined) {
|
||||
if (that.inputData == "") {
|
||||
that.$confirm("没有消耗物料确定提交吗?", "提示", {
|
||||
confirmButtonText: "确认",
|
||||
cancelButtonText: "取消",
|
||||
type: "error",
|
||||
})
|
||||
.then( () => {
|
||||
submitOperation(that.id,{token:data.token}).then(res=>{
|
||||
if(res.code===200){
|
||||
that.$router.push({name: "operation"});
|
||||
that.$message.success("操作提交成功!");
|
||||
}else{
|
||||
that.$message.error(res.msg)
|
||||
}
|
||||
});
|
||||
}).catch((err) => {
|
||||
that.$message.error(err);
|
||||
});
|
||||
} else {
|
||||
submitOperation(that.id,{token:data.token}).then((res) => {
|
||||
if (res.code === 200) {
|
||||
that.$router.push({name: "operation"});
|
||||
that.$message.success("操作提交成功!");
|
||||
}else{
|
||||
that.$message.error(res.msg)
|
||||
}
|
||||
}).catch((err) => {
|
||||
that.$message.error(err);
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
closeDialog(){
|
||||
this.limitedPhoto = false;
|
||||
},
|
||||
//点击人脸验证
|
||||
directorConfirm() {
|
||||
this.limitedPhoto = true;
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -26,6 +26,11 @@
|
|||
{{ actstate_[scope.row.act_state] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验员">
|
||||
<!--<template slot-scope="scope">-->
|
||||
<!--{{ actstate_[scope.row.act_state] }}-->
|
||||
<!--</template>-->
|
||||
</el-table-column>
|
||||
<el-table-column label="所在子工序">
|
||||
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
|
||||
</el-table-column>
|
||||
|
|
Loading…
Reference in New Issue