1228
This commit is contained in:
parent
04f1521939
commit
d5c3e627b4
|
|
@ -687,11 +687,13 @@
|
||||||
that.field = []; //检查项目
|
that.field = []; //检查项目
|
||||||
let submit = isSubmit=='1'?false:true;
|
let submit = isSubmit=='1'?false:true;
|
||||||
that.formData.forEach((item) => {
|
that.formData.forEach((item) => {
|
||||||
let field_value = 0;
|
let field_value = null;
|
||||||
if(item.field_type==='int'){
|
if(item.field_type==='int'){
|
||||||
field_value = parseInt(that.checkForm[item.field_key])
|
field_value = parseInt(that.checkForm[item.field_key])
|
||||||
}else if(item.field_type==='float'){
|
}else if(item.field_type==='float'){
|
||||||
field_value = parseFloat(that.checkForm[item.field_key])
|
field_value = parseFloat(that.checkForm[item.field_key])
|
||||||
|
}else{
|
||||||
|
field_value = that.checkForm[item.field_key];
|
||||||
}
|
}
|
||||||
that.field.push({
|
that.field.push({
|
||||||
id: item.id,
|
id: item.id,
|
||||||
|
|
|
||||||
|
|
@ -428,20 +428,20 @@ export default {
|
||||||
// 检查json
|
// 检查json
|
||||||
checkJson(){
|
checkJson(){
|
||||||
if (this.hasJsonFlag == false){
|
if (this.hasJsonFlag == false){
|
||||||
alert("限制表达式json验证失败")
|
// alert("限制表达式json验证失败")
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
alert("限制表达式json验证成功")
|
// alert("限制表达式json验证成功")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 检查json
|
// 检查json
|
||||||
checkJson2(){
|
checkJson2(){
|
||||||
if (this.hasJsonFlag1 == false){
|
if (this.hasJsonFlag1 == false){
|
||||||
alert("展现表单字段json验证失败")
|
// alert("展现表单字段json验证失败")
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
alert("展现表单字段json1验证成功")
|
// alert("展现表单字段json1验证成功")
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -184,15 +184,20 @@
|
||||||
<el-col :span="1" style="height: 1px;"></el-col>
|
<el-col :span="1" style="height: 1px;"></el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-select style="width: 100%" v-model="item.value" placeholder="请选择状态">
|
<el-select style="width: 100%" v-model="item.value" placeholder="请选择状态">
|
||||||
<el-option label="只读" value="1"></el-option>
|
<el-option
|
||||||
<el-option label="必填" value="2"></el-option>
|
v-for="item in state_fields"
|
||||||
<el-option label="可选" value="3"></el-option>
|
:label="item.label"
|
||||||
<el-option label="隐藏" value="4"></el-option>
|
:value="item.value"
|
||||||
|
:key="item.value"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="2" style="text-align: center" v-if="$index!==0">
|
<el-col :span="2" style="text-align: center" v-if="$index!==0">
|
||||||
<i class="el-icon-remove-outline" @click.prevent="removeStatusChange($index)"
|
<i
|
||||||
style="color: red;font-size: 16px;"></i>
|
class="el-icon-remove-outline"
|
||||||
|
style="color: red;font-size: 16px;"
|
||||||
|
@click.prevent="removeStatusChange($index)"
|
||||||
|
></i>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -292,6 +297,21 @@
|
||||||
value: 9,
|
value: 9,
|
||||||
label: '代码获取'
|
label: '代码获取'
|
||||||
}],
|
}],
|
||||||
|
state_fields:[
|
||||||
|
{
|
||||||
|
value: 1,
|
||||||
|
label: '只读'
|
||||||
|
},{
|
||||||
|
value: 2,
|
||||||
|
label: '必填'
|
||||||
|
},{
|
||||||
|
value: 3,
|
||||||
|
label: '可选'
|
||||||
|
},{
|
||||||
|
value: 4,
|
||||||
|
label: '隐藏'
|
||||||
|
},
|
||||||
|
],
|
||||||
display_form_str: [],
|
display_form_str: [],
|
||||||
limit_expression: [],
|
limit_expression: [],
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
|
@ -316,8 +336,8 @@
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
checkPermission(value){
|
checkPermission(value){
|
||||||
debugger;
|
/* debugger;
|
||||||
console.log(checkPermission(value))
|
console.log(checkPermission(value))*/
|
||||||
checkPermission(value);
|
checkPermission(value);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -132,7 +132,6 @@
|
||||||
<el-button v-if="ticketDetail.in_add_node" class="filter-item" type="primary" @click="handleClick('3')">加签处理</el-button>
|
<el-button v-if="ticketDetail.in_add_node" class="filter-item" type="primary" @click="handleClick('3')">加签处理</el-button>
|
||||||
<el-button v-for="item in operationBtn" :key="item.id" class="filter-item" type="primary" @click="operationSubmit(item.id)">{{item.name}}</el-button>
|
<el-button v-for="item in operationBtn" :key="item.id" class="filter-item" type="primary" @click="operationSubmit(item.id)">{{item.name}}</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card style="margin-left: 10px">
|
<el-card style="margin-left: 10px">
|
||||||
|
|
@ -316,6 +315,24 @@
|
||||||
let dat = that.flowSteps.filter((item)=>{
|
let dat = that.flowSteps.filter((item)=>{
|
||||||
return item.id==state;
|
return item.id==state;
|
||||||
})
|
})
|
||||||
|
debugger;
|
||||||
|
let state_fields = dat[0].state_fields;
|
||||||
|
if(state_fields!=={}){
|
||||||
|
for (let labe in state_fields) {
|
||||||
|
for(let j = 0;j<that.ticketDetail.ticket_data_.length;j++){
|
||||||
|
if(that.ticketDetail.ticket_data_[j].field_key===labe){
|
||||||
|
debugger;
|
||||||
|
console.log(labe)
|
||||||
|
console.log(state_fields[labe])
|
||||||
|
if(state_fields[labe]!==4){
|
||||||
|
that.ticketDetail.ticket_data_[j].is_hidden = false
|
||||||
|
}else{
|
||||||
|
that.ticketDetail.ticket_data_[j].is_hidden = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
that.sort = dat[0].sort;
|
that.sort = dat[0].sort;
|
||||||
that.actives = that.flowSteps.indexOf(dat[0]);
|
that.actives = that.flowSteps.indexOf(dat[0]);
|
||||||
if( that.flowSteps.length-that.actives >1){}else{
|
if( that.flowSteps.length-that.actives >1){}else{
|
||||||
|
|
@ -333,6 +350,7 @@
|
||||||
getWfStateList(workflow).then((response) => {
|
getWfStateList(workflow).then((response) => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
let nodes = response.data;
|
let nodes = response.data;
|
||||||
|
|
||||||
// 添加节点
|
// 添加节点
|
||||||
nodes.forEach((item) => {
|
nodes.forEach((item) => {
|
||||||
if(item.sort==that.sort){
|
if(item.sort==that.sort){
|
||||||
|
|
@ -455,8 +473,6 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
activated(){
|
activated(){
|
||||||
},
|
},
|
||||||
|
|
@ -516,7 +532,6 @@
|
||||||
.style('left', `${d3.event.pageX + 15}px`)
|
.style('left', `${d3.event.pageX + 15}px`)
|
||||||
.style('top', `${d3.event.pageY-10}px`)
|
.style('top', `${d3.event.pageY-10}px`)
|
||||||
},
|
},
|
||||||
|
|
||||||
// tooltip隐藏
|
// tooltip隐藏
|
||||||
tipHidden() {
|
tipHidden() {
|
||||||
this.tooltip
|
this.tooltip
|
||||||
|
|
@ -606,9 +621,6 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
addNode(){
|
|
||||||
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,19 @@
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['warehouse_update'])"
|
v-if="checkPermission(['warehouse_update'])"
|
||||||
@click="handleInspection(scope)"
|
@click="handleInspection(scope)"
|
||||||
>检验</el-link
|
>检验
|
||||||
|
</el-link
|
||||||
>
|
>
|
||||||
|
<el-link
|
||||||
|
v-if="checkPermission(['warehouse_update'])&&scope.row.test===null"
|
||||||
|
@click="handleInspection(scope)"
|
||||||
|
>检验
|
||||||
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
v-if="scope.row.test!==null"
|
||||||
|
@click="checkRecord(scope)"
|
||||||
|
>检验记录
|
||||||
|
</el-link>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -53,7 +64,8 @@
|
||||||
<el-tab-pane label="已合格成品">
|
<el-tab-pane label="已合格成品">
|
||||||
<el-card style="margin-top: 2px">
|
<el-card style="margin-top: 2px">
|
||||||
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
<el-button type="primary" icon="el-icon-plus" @click="handleCreate"
|
||||||
>批量入库</el-button
|
>批量入库
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
|
|
@ -92,7 +104,8 @@
|
||||||
<el-link
|
<el-link
|
||||||
v-if="checkPermission(['warehouse_update'])"
|
v-if="checkPermission(['warehouse_update'])"
|
||||||
@click="handlePutin(scope)"
|
@click="handlePutin(scope)"
|
||||||
>入库</el-link
|
>入库
|
||||||
|
</el-link
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -107,8 +120,122 @@
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
|
<!--物料检查表&&-->
|
||||||
<el-dialog title="物料检查表" :close-on-click-modal="false" :visible.sync="outerVisible">
|
<el-dialog title="物料检查表" :close-on-click-modal="false" :visible.sync="outerVisible">
|
||||||
|
<el-select style="width: 100%" v-model="recordform" placeholder="请选择" @change="recordformChange">
|
||||||
|
<el-option
|
||||||
|
v-for="item in recordformList"
|
||||||
|
:key="item.name"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
<!-- <!–第一次操作时的展示–>
|
||||||
|
<el-dialog
|
||||||
|
width="60%"
|
||||||
|
:title="formName"
|
||||||
|
:visible.sync="innerVisible"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<customForm
|
||||||
|
:results="fieldList"
|
||||||
|
:hasPicture="hasPicture"
|
||||||
|
:formID="recordform"
|
||||||
|
:wproduct="wproduct"
|
||||||
|
:recordId="recordId"
|
||||||
|
@recordSubmit="recordSubmit"
|
||||||
|
@recordSave="recordSave"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
<!–复检检验表单–>
|
||||||
|
<el-dialog
|
||||||
|
width="60%"
|
||||||
|
:title="formName"
|
||||||
|
:visible.sync="limitedReview"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<reviewForm
|
||||||
|
:results="fieldList"
|
||||||
|
:originList="originList"
|
||||||
|
:formID="recordform"
|
||||||
|
:hasPicture="hasPicture"
|
||||||
|
:wproduct="wproduct"
|
||||||
|
:origintest="origintest"
|
||||||
|
@formFunc="formFunc"
|
||||||
|
/>
|
||||||
|
</el-dialog>-->
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="outerVisible = false">
|
||||||
|
取 消
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" @click="submitrecordform()">填写检查项目</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!--检查表显示-->
|
||||||
|
<el-dialog
|
||||||
|
width="60%"
|
||||||
|
:title="formName"
|
||||||
|
:visible.sync="innerVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
@close="recordCancel"
|
||||||
|
>
|
||||||
|
<customForm
|
||||||
|
:results="fieldList"
|
||||||
|
:hasPicture="hasPicture"
|
||||||
|
:formID="recordform"
|
||||||
|
:wproduct="wproduct"
|
||||||
|
:recordId="recordId"
|
||||||
|
@recordSubmit="recordSubmit"
|
||||||
|
@recordSave="recordSave"
|
||||||
|
@recordCancel="recordCancel"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
<!--检验记录-->
|
||||||
|
<el-dialog title="检验记录" :close-on-click-modal="false" :visible.sync="limitedCheckRecord">
|
||||||
|
<el-table
|
||||||
|
:data="recordList"
|
||||||
|
border
|
||||||
|
height="400"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50"/>
|
||||||
|
<el-table-column label="表单名称">
|
||||||
|
<template slot-scope="scope">{{ scope.row.form_.name }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="检查类型">
|
||||||
|
<template slot-scope="scope">{{ checkTypes[scope.row.type] }}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="是否提交">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.is_submited">已提交</span>
|
||||||
|
<span v-else>未提交</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="操作">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link
|
||||||
|
v-if="!scope.row.is_submited"
|
||||||
|
@click="handleInspectionRecord(scope)"
|
||||||
|
>检验
|
||||||
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
v-else
|
||||||
|
@click="handleRecordDetail(scope)"
|
||||||
|
>查看
|
||||||
|
</el-link>
|
||||||
|
<el-link
|
||||||
|
@click="delTestRecord(scope)"
|
||||||
|
>删除
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="putin">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!--<el-dialog title="物料检查表" :close-on-click-modal="false" :visible.sync="outerVisible">
|
||||||
<el-select style="width: 100%" v-model="recordform" placeholder="请选择">
|
<el-select style="width: 100%" v-model="recordform" placeholder="请选择">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in recordformList"
|
v-for="item in recordformList"
|
||||||
|
|
@ -252,20 +379,22 @@
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="innerVisible = false">取 消</el-button>
|
<el-button @click="innerVisible = false">取 消</el-button>
|
||||||
<el-button type="primary" @click="submitfield"
|
<el-button type="primary" @click="submitfield"
|
||||||
>提交检查项目</el-button
|
>提交检查项目
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="outerVisible = false">取 消</el-button>
|
<el-button @click="outerVisible = false">取 消</el-button>
|
||||||
<el-button type="primary" @click="submitrecordform"
|
<el-button type="primary" @click="submitrecordform"
|
||||||
>填写检查项目</el-button
|
>填写检查项目
|
||||||
|
</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>-->
|
||||||
<el-dialog title="成品入库" :close-on-click-modal="false" :visible.sync="dialogFormVisible">
|
<el-dialog title="成品入库" :close-on-click-modal="false" :visible.sync="dialogFormVisible">
|
||||||
<el-form :model="form">
|
<el-form :model="form">
|
||||||
<el-form-item label="仓库" :label-width="formLabelWidth">
|
<el-form-item label="仓库">
|
||||||
<el-select
|
<el-select
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="form.warehouse"
|
v-model="form.warehouse"
|
||||||
|
|
@ -280,7 +409,7 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" :label-width="formLabelWidth">
|
<el-form-item label="备注">
|
||||||
<el-input v-model="form.remark"></el-input>
|
<el-input v-model="form.remark"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
@ -292,7 +421,7 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<el-dialog title="半成品批量入库" :close-on-click-modal="false" :visible.sync="dialogFormVisibles">
|
<el-dialog title="半成品批量入库" :close-on-click-modal="false" :visible.sync="dialogFormVisibles">
|
||||||
<el-form :model="form">
|
<el-form :model="form">
|
||||||
<el-form-item label="仓库" :label-width="formLabelWidth">
|
<el-form-item label="仓库">
|
||||||
<el-select
|
<el-select
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
v-model="form.warehouse"
|
v-model="form.warehouse"
|
||||||
|
|
@ -307,7 +436,7 @@
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="备注" :label-width="formLabelWidth">
|
<el-form-item label="备注">
|
||||||
<el-input v-model="form.remark"></el-input>
|
<el-input v-model="form.remark"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
@ -320,15 +449,18 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getwproductList ,wproductTest,wproductPutin,createputins} from "@/api/wpm";
|
import {testInit} from "@/api/wpm";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import {getWarehouseList} from "@/api/inm";
|
import {getWarehouseList} from "@/api/inm";
|
||||||
import {getMaterialList, getrecordformList, getrffieldList} from "@/api/mtm";
|
import {getMaterialList, getrecordformList, getrffieldList} from "@/api/mtm";
|
||||||
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 customForm from '@/components/customForm/index';
|
||||||
|
import {getwproductList, wproductTest, wproductPutin, createputins} from "@/api/wpm";
|
||||||
|
import {getTestRecord,getTestRecordItem,putTestRecordItem,delTestRecordItem,subTestRecordItem} from "@/api/qm";
|
||||||
const defaultetestitem = {};
|
const defaultetestitem = {};
|
||||||
export default {
|
export default {
|
||||||
components: { Pagination },
|
components: {Pagination,customForm},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
testitem: defaultetestitem,
|
testitem: defaultetestitem,
|
||||||
|
|
@ -363,6 +495,13 @@ export default {
|
||||||
50: "不合格",
|
50: "不合格",
|
||||||
60: "待成品检验",
|
60: "待成品检验",
|
||||||
},
|
},
|
||||||
|
checkTypes:{
|
||||||
|
10:"子工序检验",
|
||||||
|
20:"工序检验",
|
||||||
|
30:"工序复检",
|
||||||
|
36:"夹层检验",
|
||||||
|
40:"成品检验",
|
||||||
|
},
|
||||||
choice: [
|
choice: [
|
||||||
{
|
{
|
||||||
value: true,
|
value: true,
|
||||||
|
|
@ -375,20 +514,26 @@ export default {
|
||||||
],
|
],
|
||||||
options: [],
|
options: [],
|
||||||
listLoading: true,
|
listLoading: true,
|
||||||
fieldList: "",
|
wproduct: null,
|
||||||
|
recordId: null,
|
||||||
|
fieldList: null,
|
||||||
is_testok: "true",
|
is_testok: "true",
|
||||||
field: [],
|
field: [],
|
||||||
|
recordList: [],
|
||||||
recordformList: [],
|
recordformList: [],
|
||||||
recordform: "",
|
recordform: null,
|
||||||
fifo_detail: "",
|
fifo_detail: "",
|
||||||
listQueryrecordform: {
|
listQueryrecordform: {
|
||||||
page: 0,
|
page: 0,
|
||||||
},
|
},
|
||||||
|
hasPicture: false,
|
||||||
outerVisible: false,
|
outerVisible: false,
|
||||||
innerVisible: false,
|
innerVisible: false,
|
||||||
dialogFormVisible: false,
|
dialogFormVisible: false,
|
||||||
dialogFormVisibles: false,
|
dialogFormVisibles: false,
|
||||||
|
limitedCheckRecord: false,
|
||||||
testrecord: {},
|
testrecord: {},
|
||||||
|
formName: "检验表",
|
||||||
WarehouseData: "",
|
WarehouseData: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
@ -398,7 +543,7 @@ export default {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
|
||||||
this.getList1();
|
this.getList1();
|
||||||
this.getLists();
|
// this.getLists();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
|
|
@ -444,7 +589,11 @@ export default {
|
||||||
});
|
});
|
||||||
console.log(_this.mutipID);
|
console.log(_this.mutipID);
|
||||||
|
|
||||||
createputins({warehouse:this.form.warehouse,wproducts: _this.mutipID,remark:this.form.remark}).then((res) => {
|
createputins({
|
||||||
|
warehouse: this.form.warehouse,
|
||||||
|
wproducts: _this.mutipID,
|
||||||
|
remark: this.form.remark
|
||||||
|
}).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.$message.success("批量入库成功!");
|
this.$message.success("批量入库成功!");
|
||||||
this.dialogFormVisibles = false;
|
this.dialogFormVisibles = false;
|
||||||
|
|
@ -461,31 +610,6 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
|
||||||
handleInspection(scope) {
|
|
||||||
//调该物料对应的检查表
|
|
||||||
this.outerVisible = true;
|
|
||||||
this.wproduct=scope.row.id;//半成品ID
|
|
||||||
this.wproductactstate=scope.row.act_state;//半成品状态
|
|
||||||
this.listQueryrecordform.material = scope.row.material;//
|
|
||||||
this.listQueryrecordform.type = 2;
|
|
||||||
this.recordform="";
|
|
||||||
getrecordformList(this.listQueryrecordform).then((response) => {
|
|
||||||
if (response.data) {
|
|
||||||
this.recordformList = response.data;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//根据选择的表,渲染检查项目
|
|
||||||
submitrecordform() {
|
|
||||||
if (this.recordform != "") {
|
|
||||||
getrffieldList({ form: this.recordform, page: 0 }).then((response) => {
|
|
||||||
if (response.data) {
|
|
||||||
this.fieldList = response.data;
|
|
||||||
this.innerVisible = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else this.$message.error("请选择检查表!");
|
|
||||||
},
|
},
|
||||||
//提交检查项目
|
//提交检查项目
|
||||||
submitfield() {
|
submitfield() {
|
||||||
|
|
@ -507,7 +631,6 @@ export default {
|
||||||
this.testrecord.wproduct = this.wproduct;//半成品ID
|
this.testrecord.wproduct = this.wproduct;//半成品ID
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
wproductTest(this.testrecord).then((res) => {
|
wproductTest(this.testrecord).then((res) => {
|
||||||
if (res.code >= 200) {
|
if (res.code >= 200) {
|
||||||
this.innerVisible = false;
|
this.innerVisible = false;
|
||||||
|
|
@ -519,8 +642,6 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
//半成品入库
|
//半成品入库
|
||||||
handlePutin(scope) {
|
handlePutin(scope) {
|
||||||
|
|
@ -536,7 +657,204 @@ export default {
|
||||||
this.getList1();
|
this.getList1();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
//点击table中的检验
|
||||||
|
handleInspection(scope) {
|
||||||
|
let that = this;
|
||||||
|
//调该物料对应的检查表
|
||||||
|
this.wproduct = scope.row.id;//成品ID
|
||||||
|
this.listQueryrecordform.material = scope.row.material;//
|
||||||
|
this.listQueryrecordform.type = 2;
|
||||||
|
this.recordform = null;
|
||||||
|
getrecordformList(this.listQueryrecordform).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
this.recordformList = response.data;
|
||||||
|
if(response.data.length===1){
|
||||||
|
that.recordform = response.data[0].id;
|
||||||
|
that.formName = response.data[0].name;
|
||||||
|
that.submitrecordform();
|
||||||
|
}else{
|
||||||
|
//弹出列表选择框
|
||||||
|
this.outerVisible = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//根据选择的表,渲染检查项目
|
||||||
|
submitrecordform() {
|
||||||
|
let that = this;
|
||||||
|
if (this.recordform != "") {
|
||||||
|
testInit({ wproduct: that.wproduct,form: that.recordform}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
that.hasPicture = false;
|
||||||
|
that.recordId = response.data.id;
|
||||||
|
getTestRecordItem(response.data.id).then((res) => {
|
||||||
|
that.formName = res.data.form_.name;
|
||||||
|
let fieldList = res.data.record_data;
|
||||||
|
that.fieldList = [...fieldList];
|
||||||
|
let arr = fieldList.filter(item => {
|
||||||
|
return item.field_type === 'draw'
|
||||||
|
});
|
||||||
|
if (arr.length > 0) {
|
||||||
|
that.hasPicture = true;
|
||||||
|
}
|
||||||
|
that.$nextTick(()=>{
|
||||||
|
that.innerVisible = true;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else this.$message.error("请选择检查表!");
|
||||||
|
},
|
||||||
|
//选择物料检查表
|
||||||
|
recordformChange() {
|
||||||
|
let that = this;
|
||||||
|
let arr = this.recordformList.filter(item => {
|
||||||
|
return item.id === that.recordform;
|
||||||
|
});
|
||||||
|
that.formName = arr[0].name;
|
||||||
|
},
|
||||||
|
//更新检验记录列表
|
||||||
|
refreshRecord(){
|
||||||
|
let that = this;
|
||||||
|
getTestRecord({wproduct:that.wproduct,page:0}).then(res=>{
|
||||||
|
if(res.code==200){
|
||||||
|
that.recordList = res.data;
|
||||||
|
}else{
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//检验记录
|
||||||
|
checkRecord(scope){
|
||||||
|
let that = this;
|
||||||
|
that.wproduct = scope.row.id;//半成品ID
|
||||||
|
that.limitedCheckRecord = true;
|
||||||
|
getTestRecord({wproduct:scope.row.id,page:0}).then(res=>{
|
||||||
|
if(res.code==200){
|
||||||
|
that.recordList = res.data;
|
||||||
|
}else{
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//点击记录里的检验
|
||||||
|
handleInspectionRecord(scope){
|
||||||
|
let that =this;
|
||||||
|
that.innerVisible = false;
|
||||||
|
that.recordId = scope.row.id;
|
||||||
|
that.recordform = scope.row.form;
|
||||||
|
that.formName = scope.row.form_.name;
|
||||||
|
getrffieldList({form: this.recordform, page: 1, page_size: 100}).then((response) => {
|
||||||
|
if (response.data) {
|
||||||
|
that.hasPicture = false;
|
||||||
|
let fieldList = response.data.results;
|
||||||
|
that.fieldList = [...fieldList];
|
||||||
|
let arr = fieldList.filter(item => {
|
||||||
|
return item.field_type === 'draw'
|
||||||
|
});
|
||||||
|
if (arr.length > 0) {
|
||||||
|
that.hasPicture = true;
|
||||||
|
}
|
||||||
|
getTestRecordItem(scope.row.id).then((res) => {
|
||||||
|
let arr = [];
|
||||||
|
let fieldList = res.data.record_data;
|
||||||
|
for(let i=0;i<that.fieldList.length;i++){
|
||||||
|
let obj = that.fieldList[i];
|
||||||
|
obj.is_testok = null;
|
||||||
|
for(let j=0;j<fieldList.length;j++){
|
||||||
|
if(that.fieldList[i].field_key===fieldList[j].field_key){
|
||||||
|
obj.id = parseInt(fieldList[j].id);
|
||||||
|
obj.is_testok = fieldList[j].is_testok;
|
||||||
|
obj.field_value = fieldList[j].field_value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arr.push(obj)
|
||||||
|
}
|
||||||
|
that.fieldList = arr;
|
||||||
|
that.$nextTick(()=>{
|
||||||
|
that.innerVisible = true;
|
||||||
|
});
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
delTestRecord(scope){
|
||||||
|
let that = this;
|
||||||
|
this.$confirm("确认删除?", "警告", {
|
||||||
|
confirmButtonText: "确认",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "error",
|
||||||
|
})
|
||||||
|
.then(async () => {
|
||||||
|
await delTestRecordItem(scope.row.id).then(res=>{
|
||||||
|
if(res.code>=200){
|
||||||
|
that.$message.success("成功");
|
||||||
|
that.refreshRecord();
|
||||||
|
this.getList();
|
||||||
|
this.getList1();
|
||||||
|
}else{
|
||||||
|
this.$message.error(res.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//保存检查项目
|
||||||
|
recordSave(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).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
that.innerVisible = false;
|
||||||
|
that.limitedReview = false;
|
||||||
|
that.getList();
|
||||||
|
that.getList1();
|
||||||
|
that.refreshRecord();
|
||||||
|
}else{
|
||||||
|
this.$message.error(res.msg)
|
||||||
|
}
|
||||||
|
}) .catch((err) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//记录提交检查项目
|
||||||
|
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).then((res) => {
|
||||||
|
if (res.code >= 200) {
|
||||||
|
subTestRecordItem(id,params).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) => {
|
||||||
|
console.error(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//第一次保存提交检查项目
|
||||||
|
recordCancel() {
|
||||||
|
this.outerVisible = false;
|
||||||
|
this.innerVisible = false;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue