liuchengka
This commit is contained in:
parent
f0a3427422
commit
362df53bd4
|
@ -334,3 +334,21 @@ export function getcutList(query) {
|
|||
})
|
||||
}
|
||||
|
||||
//军检
|
||||
|
||||
export function mtest(id,data) {
|
||||
return request({
|
||||
url: `/wpm/wproduct/${id}/mtest/`,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
//生成流程卡
|
||||
|
||||
export function getCard(id) {
|
||||
return request({
|
||||
url: `/wpm/wproduct/${id}/card/`,
|
||||
method: 'GET',
|
||||
})
|
||||
}
|
|
@ -45,7 +45,16 @@
|
|||
<el-tag v-else-if="scope.row.is_mtestok == true">合格</el-tag></template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])&&scope.row.act_state==30"
|
||||
@click="handleMtest(scope)"
|
||||
>军检
|
||||
</el-link>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="iproductData.count > 0"
|
||||
|
@ -54,15 +63,31 @@
|
|||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<el-dialog title="军检" :visible.sync="dialogVisible">
|
||||
<el-form :model="mtestform" label-width="130px"
|
||||
label-position="right">
|
||||
<el-form-item label="是否军检合格" prop="name">
|
||||
<el-switch v-model="mtestform.is_mtestok"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="军检备注" prop="name">
|
||||
<el-input type="textarea" v-model="mtestform.remark_mtest"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submtest">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getiproductList,saleMtest} from "@/api/inm";
|
||||
import { getiproductList} from "@/api/inm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
|
||||
import { mtest } from "@/api/wpm";
|
||||
import { genTree } from "@/utils";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
|
||||
|
@ -82,6 +107,9 @@ export default {
|
|||
salesdetail:"",
|
||||
saleproduct:"",
|
||||
dialogVisible:false,
|
||||
mtestform:{
|
||||
is_mtestok:false,
|
||||
}
|
||||
|
||||
};
|
||||
},
|
||||
|
@ -104,10 +132,19 @@ export default {
|
|||
});
|
||||
},
|
||||
handleMtest(scope){
|
||||
|
||||
this.saleproduct=scope.row.id;
|
||||
this.dialogVisible=true;
|
||||
},
|
||||
|
||||
submtest(){
|
||||
mtest(this.saleproduct,this.mtestform).then((res)=>{
|
||||
if(res.code >= 200)
|
||||
{
|
||||
this.$message.success("提交成功!");
|
||||
this.dialogVisible=false;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -1,34 +1,55 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-top: 2px">
|
||||
流程卡界面正在更新
|
||||
</el-card>
|
||||
<div style="text-align: center">
|
||||
|
||||
<table style=" margin: auto;margin-top:50px; font-family: verdana,arial,sans-serif;font-size:20px;color:#333333;border-width: 1px;border-color: #666666; border-collapse: collapse;">
|
||||
<tr v-for="(items,indexs) in card" :key="indexs+1" onmouseover="this.style.backgroundColor='#ffff66';" onmouseout="this.style.backgroundColor='#d4e3e5';">
|
||||
|
||||
<td v-for="(item,index) in card[indexs]" :key="index" style="border-width: 1px;
|
||||
padding: 8px; border-style: solid; border-color: #a9c6c9;">
|
||||
<el-span v-if="index>1&&indexs>0&&indexs!=9">
|
||||
<el-tag type="success" v-for="(item1,index1) in item" :key="index1">
|
||||
{{item1.action_by_name}}
|
||||
{{item1.action_time}}
|
||||
</el-tag>
|
||||
</el-span>
|
||||
<el-span v-else>{{item}}</el-span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { getProductionplan,getsubproductionplanList } from "@/api/pm";
|
||||
import { getMaterialList, getrecordformList, getrffieldList } from "@/api/mtm";
|
||||
import customForm from "@/components/customForm/index";
|
||||
import { getTestRecord ,getTestRecordItem} from "@/api/qm";
|
||||
import { getCard} from "@/api/wpm";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
|
||||
export default {
|
||||
components: { Pagination, customForm },
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
|
||||
card:{},
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
|
||||
this.id = this.$route.params.id;
|
||||
this.getCard();
|
||||
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
getCard(){
|
||||
getCard(this.id).then((response) => {
|
||||
if (response.code==200) {
|
||||
this.card = response.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -316,12 +316,8 @@ export default {
|
|||
//不合格玻璃审理单查看
|
||||
handledetailbhg(scope)
|
||||
{
|
||||
this.limitedRetrial=true;
|
||||
ticketread(scope.row.ticket).then((response) => {
|
||||
if (response.data) {
|
||||
this.customfieldList = response.data;
|
||||
}
|
||||
});
|
||||
|
||||
this.$router.push({name:"ticketDetail",params:{ticketId:scope.row.ticket}})
|
||||
}
|
||||
|
||||
},
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-tabs v-model="activeName" type="card" >
|
||||
<el-tab-pane label="总览" name="1" >
|
||||
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="待检成品" name="2">
|
||||
<el-table
|
||||
|
||||
:data="wproductList.results"
|
||||
|
@ -16,33 +11,53 @@
|
|||
highlight-current-row
|
||||
max-height="600"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="成品名称">
|
||||
<template slot-scope="scope">{{ scope.row.material_.name }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="成品编号">
|
||||
<el-table-column type="index" label="序号" width="50"/>
|
||||
<el-table-column label="产品编号">
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检测状态">
|
||||
<template slot-scope="scope">
|
||||
{{ actstate_[scope.row.act_state] }}
|
||||
</template>
|
||||
|
||||
<el-table-column label="任务编号">
|
||||
<template slot-scope="scope" v-if="scope.row.subproduction_plan_">{{ scope.row.subproduction_plan_.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="产品名称">
|
||||
<template slot-scope="scope" v-if="scope.row.material_">{{ scope.row.material_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="型号规格">
|
||||
<template slot-scope="scope" v-if="scope.row.material_">{{ scope.row.material_.specification }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="所在子工序">
|
||||
<template slot-scope="scope">{{ scope.row.step_.name }}</template>
|
||||
<el-table-column label="军检状态">
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.is_mtested==false">未军检</el-tag>
|
||||
<el-tag v-if="scope.row.is_mtested==true">已军检</el-tag>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="军检结论">
|
||||
|
||||
<template slot-scope="scope"><el-tag v-if="scope.row.is_mtestok==false">不合格</el-tag>
|
||||
<el-tag v-if="scope.row.is_mtestok==true">合格</el-tag></template>
|
||||
</el-table-column>
|
||||
<el-table-column label="仓库">
|
||||
<template slot-scope="scope" v-if="scope.row.warehouse_">{{ scope.row.warehouse_.name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查表">
|
||||
<template slot-scope="scope">{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="检查状态">
|
||||
<template slot-scope="scope">{{ actstate_[scope.row.act_state]}}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" label="操作" width="220px">
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['warehouse_update'])&&scope.row.test===null"
|
||||
@click="handleInspection(scope)"
|
||||
>检验
|
||||
v-if="checkPermission(['warehouse_update'])&&scope.row.act_state==30&&scope.row.is_mtested==false"
|
||||
@click="handleMtest(scope)"
|
||||
>军检
|
||||
</el-link>
|
||||
<el-link
|
||||
v-if="scope.row.test!==null"
|
||||
|
||||
@click="checkRecord(scope)"
|
||||
>检验记录
|
||||
</el-link>
|
||||
|
@ -56,15 +71,77 @@
|
|||
:limit.sync="listQuery.page_size"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="合格成品" name="3">
|
||||
<el-dialog title="军检" :visible.sync="dialogVisible">
|
||||
<el-form :model="mtestform" label-width="130px"
|
||||
label-position="right">
|
||||
<el-form-item label="是否军检合格" prop="name">
|
||||
<el-switch v-model="mtestform.is_mtestok"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="军检备注" prop="name">
|
||||
<el-input type="textarea" v-model="mtestform.remark_mtest"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="不合格成品" name="4">
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submtest">确 定</el-button>
|
||||
</div>
|
||||
</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-tab-pane>
|
||||
</el-tabs>
|
||||
<el-link
|
||||
@click="handleRecordDetail(scope)"
|
||||
>查看
|
||||
</el-link>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
width="60%"
|
||||
:title="formName"
|
||||
:visible.sync="recordVisible"
|
||||
:close-on-click-modal="false"
|
||||
@close="recordCancel"
|
||||
>
|
||||
<customForm
|
||||
v-if="recordVisible"
|
||||
:results="fieldList"
|
||||
:hasPicture="hasPicture"
|
||||
:formID="recordform"
|
||||
:wproduct="wproduct"
|
||||
:recordId="recordId"
|
||||
:isDisabled="isDisabled"
|
||||
@recordSubmit="recordSubmit"
|
||||
@recordSave="recordSave"
|
||||
@recordCancel="recordCancel"
|
||||
/>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
|
||||
|
||||
|
@ -75,13 +152,15 @@
|
|||
<script>
|
||||
import { getfifodetailList } from "@/api/inm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import { createTestrecord } from "@/api/inm";
|
||||
import { mtest,getwproductList } from "@/api/wpm";
|
||||
|
||||
import {getwproductList, wproductTest, wproductPutin, createputins} from "@/api/wpm";
|
||||
import customForm from '@/components/customForm/index';
|
||||
import { getrecordformList, getrffieldList} from "@/api/mtm";
|
||||
import {getTestRecord,getTestRecordItem} from "@/api/qm";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
components: { Pagination,customForm },
|
||||
data() {
|
||||
return {
|
||||
wproductList: {
|
||||
|
@ -93,7 +172,54 @@ export default {
|
|||
page_size: 20,
|
||||
},
|
||||
|
||||
activeName:"1"
|
||||
checkTypes: {
|
||||
10: "子工序检验",
|
||||
20: "工序检验",
|
||||
30: "工序复检",
|
||||
36: "夹层检验",
|
||||
40: "成品检验",
|
||||
},
|
||||
actstate_: {
|
||||
6: "待复检",
|
||||
10: "操作进行中",
|
||||
20: "待检验",
|
||||
30: "已合格",
|
||||
40: "库存中",
|
||||
50: "不合格",
|
||||
60: "待成品检验",
|
||||
8: "操作准备中",
|
||||
26: "待夹层检验",
|
||||
70: "报废",
|
||||
},
|
||||
activeName:"1",
|
||||
saleproduct:"",
|
||||
dialogVisible:false,
|
||||
mtestform:{
|
||||
is_mtestok:false,
|
||||
},
|
||||
wproduct: null,
|
||||
limitedCheckRecord: false,
|
||||
recordList: [],
|
||||
fieldList: [],
|
||||
is_testok: "true",
|
||||
recordformList: [],
|
||||
customfieldList: [],
|
||||
recordform: null,
|
||||
recordId: null,
|
||||
fifo_detail: "",
|
||||
listQueryrecordform: {
|
||||
page: 0,
|
||||
},
|
||||
recordVisible: false,
|
||||
isDisabled: false,
|
||||
hasPicture: false,
|
||||
dialogFormVisible: false,
|
||||
dialogFormVisibles: false,
|
||||
limitedCheckRecord: false,
|
||||
testrecord: {},
|
||||
|
||||
WarehouseData: "",
|
||||
formName: '项目检查表',
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
|
@ -109,7 +235,7 @@ export default {
|
|||
//待检成品列表
|
||||
getList() {
|
||||
|
||||
this.listQuery.act_state = 60;
|
||||
|
||||
this.listQuery.material__type = 1;
|
||||
getwproductList(this.listQuery).then((response) => {
|
||||
if (response.data) {
|
||||
|
@ -118,7 +244,76 @@ export default {
|
|||
|
||||
});
|
||||
},
|
||||
handleMtest(scope){
|
||||
|
||||
this.saleproduct=scope.row.id;
|
||||
this.dialogVisible=true;
|
||||
},
|
||||
submtest(){
|
||||
mtest(this.saleproduct,this.mtestform).then((res)=>{
|
||||
if(res.code >= 200)
|
||||
{
|
||||
this.$message.success("提交成功!");
|
||||
this.dialogVisible=false;
|
||||
}
|
||||
});
|
||||
},
|
||||
//检验记录
|
||||
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);
|
||||
}
|
||||
})
|
||||
},
|
||||
//点击记录里的查看
|
||||
handleRecordDetail(scope) {
|
||||
let that = this;
|
||||
that.fieldList = [];
|
||||
that.recordVisible = 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 = 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.isDisabled = true;
|
||||
that.recordVisible = true;
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -73,10 +73,12 @@
|
|||
:data="wproduct"
|
||||
border
|
||||
fit
|
||||
row-key="id"
|
||||
stripe
|
||||
style="width: 100%"
|
||||
height="500"
|
||||
>
|
||||
:load="load"
|
||||
:tree-props="{children: 'children'}">
|
||||
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
|
@ -89,12 +91,18 @@
|
|||
<template slot-scope="scope" >{{
|
||||
scope.row.step_.name
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="玻璃状态">
|
||||
<template slot-scope="scope" >{{
|
||||
scope.row.material_.name
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" >
|
||||
<template slot-scope="scope">{{
|
||||
<template slot-scope="scope" >{{
|
||||
actstate_[scope.row.act_state]
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="过程记录"
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
disabled="disabled"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!--
|
||||
<el-form-item label="边角料">
|
||||
<el-radio-group v-model="operationData.use_scrap">
|
||||
<el-radio border
|
||||
|
@ -44,7 +44,7 @@
|
|||
<el-form-item label="备注" v-if="operationData.use_scrap">
|
||||
<el-input type="textarea" v-model="operationData.remark"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
!-->
|
||||
<el-form-item v-if="operationData.use_scrap">
|
||||
<el-button type="primary" @click="scrapSubmit()">创建</el-button>
|
||||
<el-button>取消</el-button>
|
||||
|
@ -479,6 +479,17 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否使用边角料" width="140px">
|
||||
<template slot-scope="scope">
|
||||
<el-form :model="scope.row" widht="100px">
|
||||
<el-form-item size="mini">
|
||||
<el-switch
|
||||
v-model="scope.row.use_scrap"
|
||||
></el-switch>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="操作" width="100px">
|
||||
<template slot-scope="scope">
|
||||
|
@ -724,8 +735,8 @@ export default {
|
|||
},
|
||||
//如果使用边角料提交
|
||||
scrapSubmit() {
|
||||
this.scrapData.use_scrap = this.operationData.use_scrap;
|
||||
this.scrapData.remark = this.operationData.remark;
|
||||
// this.scrapData.use_scrap = this.operationData.use_scrap;
|
||||
// this.scrapData.remark = this.operationData.remark;
|
||||
createoperation(this.id, this.scrapData).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.$message.success("成功!");
|
||||
|
@ -936,6 +947,7 @@ export default {
|
|||
this.output.operation = this.id;
|
||||
this.output.subproduction_progress = scope.row.id;
|
||||
this.output.count = scope.row.output_count;
|
||||
this.output.use_scrap=scope.row.use_scrap;
|
||||
createOutput(this.output).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
this.getoutputLists();
|
||||
|
@ -957,6 +969,7 @@ export default {
|
|||
"operation" :this.id,
|
||||
"subproduction_progress":item.id,
|
||||
"count": item.output_count,
|
||||
"use_scrap":item.use_scrap
|
||||
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue