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

This commit is contained in:
caoqianming 2022-01-17 14:39:44 +08:00
commit e5bef0f5ef
7 changed files with 609 additions and 605 deletions

View File

@ -19,7 +19,7 @@
@expand-change="handlerExpand" @expand-change="handlerExpand"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
> >
<el-table-column label="任务编号" prop="name"> <el-table-column label="任务编号" prop="name" width="140" show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column label="产品名称" prop="productName" width="120" show-overflow-tooltip> <el-table-column label="产品名称" prop="productName" width="120" show-overflow-tooltip>
</el-table-column> </el-table-column>

View File

@ -30,6 +30,17 @@
<div>累计不合格产品数</div> <div>累计不合格产品数</div>
</div> </div>
</el-card> </el-card>
<el-card class="box-card dashboardSubRow" >
<div style="height: 40px;line-height: 40px;background: #F5F7FA;padding-left: 20px;">甘特图</div>
<!--<div :style="{height:cardTabelHeight+'px'}">-->
<div>
<gantt
style="position: relative"
v-if="proList.length>0"
:proList="proList"
></gantt>
</div>
</el-card>
<el-row class="dashboardSubRow" :gutter="5"> <el-row class="dashboardSubRow" :gutter="5">
<el-col :span="12"> <el-col :span="12">
<el-card style="border-radius: 10px;"> <el-card style="border-radius: 10px;">
@ -108,7 +119,7 @@
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<el-row class="dashboardSubRow" :gutter="5"> <!--<el-row class="dashboardSubRow" :gutter="5">
<el-col :span="12"> <el-col :span="12">
<el-card style="border-radius: 10px;"> <el-card style="border-radius: 10px;">
<div class="dashboardCardHand"> <div class="dashboardCardHand">
@ -116,7 +127,7 @@
<span class="verticalLine"></span><span class="dashboardCardTitle">库存列表</span> <span class="verticalLine"></span><span class="dashboardCardTitle">库存列表</span>
<span class="stockMore" @click="stockMore">更多>></span> <span class="stockMore" @click="stockMore">更多>></span>
</div> </div>
<!--<div class="dashboardCardTitle">库存列表 </div>--> &lt;!&ndash;<div class="dashboardCardTitle">库存列表 </div>&ndash;&gt;
<div class="block"> <div class="block">
<el-pagination <el-pagination
:current-page.sync="stockPage" :current-page.sync="stockPage"
@ -164,7 +175,7 @@
<div class="CardTitleWrap"> <div class="CardTitleWrap">
<span class="verticalLine"></span><span class="dashboardCardTitle">提醒</span> <span class="verticalLine"></span><span class="dashboardCardTitle">提醒</span>
</div> </div>
<!--<div class="dashboardCardTitle">提醒</div>--> &lt;!&ndash;<div class="dashboardCardTitle">提醒</div>&ndash;&gt;
<div class="block"> <div class="block">
<el-pagination <el-pagination
:current-page.sync="remindPage" :current-page.sync="remindPage"
@ -190,7 +201,7 @@
<span>{{item}}</span><span>2021-12-20</span> <span>{{item}}</span><span>2021-12-20</span>
</div> </div>
</li> </li>
<!--<li class="listItem"> &lt;!&ndash;<li class="listItem">
<div class="itemText"> <div class="itemText">
<span>玻璃低于安全库存</span><span>2021-11-30</span> <span>玻璃低于安全库存</span><span>2021-11-30</span>
</div> </div>
@ -199,7 +210,7 @@
<div class="itemText"> <div class="itemText">
<span>某某批货临近交货日期</span><span>2021-11-20</span> <span>某某批货临近交货日期</span><span>2021-11-20</span>
</div> </div>
</li>--> </li>&ndash;&gt;
</ul> </ul>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="临近交货" name="临近交货"> <el-tab-pane label="临近交货" name="临近交货">
@ -233,20 +244,23 @@
</el-tabs> </el-tabs>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>-->
</div> </div>
</template> </template>
<script> <script>
import echarts from 'echarts' import echarts from 'echarts'
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import {getPlanGantt} from "@/api/srm";
import { getMaterialList } from "@/api/mtm"; import { getMaterialList } from "@/api/mtm";
import gantt from "@/components/Gantt/index";
import { getInventoryList } from "@/api/inm"; import { getInventoryList } from "@/api/inm";
import { getProductionplanList} from "@/api/pm"; import { getProductionplanList} from "@/api/pm";
import { getmaterialbatchList } from "@/api/inm"; import { getmaterialbatchList } from "@/api/inm";
import { getContractList , getOrderList } from "@/api/sam"; import { getContractList , getOrderList } from "@/api/sam";
export default { export default {
components: { gantt },
name: 'Dashboard', name: 'Dashboard',
data() { data() {
return { return {
@ -266,6 +280,7 @@ export default {
chartIndex:null, chartIndex:null,
tableDate:'2021-12', tableDate:'2021-12',
chartDate:'2021-12', chartDate:'2021-12',
proList: [],
planList:[], planList:[],
stockList:[], stockList:[],
remindList:[], remindList:[],
@ -654,6 +669,78 @@ export default {
handleRemindCurrentChange(val){ handleRemindCurrentChange(val){
console.log(`当前页: ${val}`); console.log(`当前页: ${val}`);
}, },
getGanttData(){
let that = this;
getPlanGantt({}).then(res=>{
if(res.code===200){
let arr =[];
let list = res.data.results;
list.forEach(item => {
if (!item.children || item.children.length < 1) {
let startTime = new Date(item.start_date).getTime();
let endTime = new Date(item.end_date).getTime();
let obj = new Object();
obj.name = item.number;
obj.id = item.id;
obj.top = 20;
obj.startTime = startTime;
obj.endTime = endTime;
obj.planTime = [startTime, endTime];
obj.per = item.count;
obj.type = 1;
obj.productName = item.product_.name;
obj.productNum = item.product_.specification;
obj.isShow = true;
arr.push(obj);
} else if (item.children && item.children.length >= 1) {
let startTime = new Date(item.start_date).getTime();
let endTime = new Date(item.end_date).getTime();
let temp =[];
let parentId = item.id;
let children = item.children;
children.forEach(child => {
let start = new Date(child.start_date).getTime();
let end = new Date(child.end_date).getTime();
let objChild = new Object();
objChild.name = child.number;
objChild.id = child.id;
objChild.top=50;
objChild.parentId=parentId;
objChild.startTime = start;
objChild.endTime = end;
objChild.planTime = [start,end];
objChild.per = child.count;
objChild.per1 = child.count_real;
objChild.type = 1;
objChild.productName = child.product_.name;
objChild.productNum = child.product_.specification;
objChild.isShow= true;
temp.push(objChild);
});
let obj=new Object();
obj.name=item.number;
obj.id=item.id;
obj.top=20;
obj.startTime=startTime;
obj.endTime=endTime;
obj.planTime = [startTime,endTime];
obj.per=item.count;
obj.per1=item.count_real;
obj.type=3;
obj.productName = item.product_.name;
obj.productNum = item.product_.specification;
obj.children = temp;
obj.isShow= true;
arr.push(obj);
}
that.proList = arr;
});
}else{
that.$message.error(res.msg);
}
})
},
}, },
mounted () { mounted () {
@ -665,6 +752,7 @@ export default {
this.drawChart(); this.drawChart();
this.getPlanList(); this.getPlanList();
this.getStockList(); this.getStockList();
this.getGanttData();
this.getStatisticsData(); this.getStatisticsData();
}, },
updated () { updated () {

View File

@ -3,15 +3,15 @@
<el-card style="margin-top: 2px"> <el-card style="margin-top: 2px">
<el-descriptions title="任务详情" :column="4" border style="margin-bottom: 20px"> <el-descriptions title="任务详情" :column="4" border style="margin-bottom: 20px">
<el-descriptions-item label="任务编号">{{productionplan.number}}</el-descriptions-item> <el-descriptions-item label="任务编号">{{productionplan.number}}</el-descriptions-item>
<el-descriptions-item label="产品名称" v-if="productionplan.product_">{{productionplan.product_.name}}</el-descriptions-item> <el-descriptions-item label="产品名称" v-if="productionplan.product_">{{productionplan.product_.name}}
<el-descriptions-item label="规格型号" v-if="productionplan.product_">{{productionplan.product_.specification}}</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="规格型号" v-if="productionplan.product_">{{productionplan.product_.specification}}
</el-descriptions-item>
<el-descriptions-item label="生产数量">{{productionplan.count}}</el-descriptions-item> <el-descriptions-item label="生产数量">{{productionplan.count}}</el-descriptions-item>
<el-descriptions-item label="生产状态">{{state_[productionplan.state]}}</el-descriptions-item> <el-descriptions-item label="生产状态">{{state_[productionplan.state]}}</el-descriptions-item>
<el-descriptions-item label="计划开工时间">{{productionplan.start_date}}</el-descriptions-item> <el-descriptions-item label="计划开工时间">{{productionplan.start_date}}</el-descriptions-item>
<el-descriptions-item label="计划完工时间">{{productionplan.end_date}}</el-descriptions-item> <el-descriptions-item label="计划完工时间">{{productionplan.end_date}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-table <el-table
:data="wproduct" :data="wproduct"
border border
@ -20,38 +20,34 @@
style="width: 100%" style="width: 100%"
height="500" height="500"
> >
<el-table-column type="index" label="序号" width="50"/>
<el-table-column type="index" label="序号" width="50" /> <el-table-column label="玻璃编号/产品编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="玻璃编号/产品编号" >
<template slot-scope="scope" >{{ scope.row.number }}</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.step_.name {{scope.row.step_.name}}
}}</template> </template>
</el-table-column> </el-table-column>
<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" >{{ <template slot-scope="scope">
scope.row.step_.name {{scope.row.step_.name}}
}}</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="最后检验结果"> <el-table-column label="最后检验结果">
<template slot-scope="scope" > <template slot-scope="scope">
<el-span v-if="scope.row.last_test_result==false">不合格</el-span> <span v-if="scope.row.last_test_result==false">不合格</span>
<el-span v-if="scope.row.last_test_result==true">合格</el-span> <span v-if="scope.row.last_test_result==true">合格</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="生产记录"> <el-table-column label="生产记录">
<template slot-scope="scope" > <template slot-scope="scope">
<el-button @click="select(scope)">查看</el-button> <el-button @click="select(scope)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -61,19 +57,15 @@
width="220px" width="220px"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['material_delete'])" v-if="checkPermission(['material_delete'])"
type="primary" type="primary"
@click="handleoption(scope)" @click="handleoption(scope)"
>生成流程卡</el-link >生成流程卡
> </el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!--检验记录--> <!--检验记录-->
<el-dialog title="检验记录" :visible.sync="limitedCheckRecord"> <el-dialog title="检验记录" :visible.sync="limitedCheckRecord">
<el-table <el-table
@ -85,86 +77,70 @@
<el-table-column label="表单名称"> <el-table-column label="表单名称">
<template slot-scope="scope">{{ scope.row.form_.name }}</template> <template slot-scope="scope">{{ scope.row.form_.name }}</template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作"> <el-table-column align="center" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
@click="handleRecordDetail(scope)" @click="handleRecordDetail(scope)"
>查看 >查看
</el-link> </el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button> <el-button @click="dialogFormVisible = false"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!--非检查表显示--> <!--非检查表显示-->
<el-dialog <el-dialog
width="60%"
:title="formName" :title="formName"
:visible.sync="recordVisible" :visible.sync="recordVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
@close="recordCancel"
> >
<customForm <el-row>
v-if="recordVisible" <el-col v-for="item in fieldList" :key="item.id" :span="12">
:results="fieldList" <div class="items" v-if="item.field_type!=='draw'">
:hasPicture="hasPicture" <span class="itemLabel">{{item.field_name}}</span>
:formID="recordform" <span>{{item.field_value}}</span>
:wproduct="wproduct" </div>
:recordId="recordId" </el-col>
:isDisabled="isDisabled" <el-col v-for="item in fieldList" :key="item.id" :span="24">
@recordSubmit="recordSubmit" <div class="items" v-if="item.field_type==='draw'" style="height: 400px">
@recordSave="recordSave" <span class="itemLabel">{{item.field_name}}</span>
@recordCancel="recordCancel" <img style="width: 45%;vertical-align: text-top;" :src="'http://47.95.0.242:2222'+item.field_value"/>
/> </div>
</el-col>
</el-row>
</el-dialog> </el-dialog>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import {getProductionplan} from "@/api/pm";
import { getProductionplan,getsubproductionplanList } from "@/api/pm"; import {getwproductList, getrecordList,recordInit} from "@/api/wpm";
import { getwproductList,getrecordList} from "@/api/wpm"; import checkPermission from "@/utils/permission";
import checkPermission from "@/utils/permission"; const defaultrecordform = {enabled: false};
import customForm from '@/components/customForm/index' export default {
import {getrffieldList} from "@/api/mtm";
import { getTestRecord ,getTestRecordItem} from "@/api/qm";
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
const defaultrecordform = {enabled:false};
export default {
components: { Pagination,customForm },
data() { data() {
return { return {
productionplan:{ productionplan: {
number:"" number: ""
}, },
activeName:"1", activeName: "1",
wproduct:[], wproduct: [],
recordList:[], recordList: [],
limitedCheckRecord:false, limitedCheckRecord: false,
listQuery: { listQuery: {
page: 1, page: 1,
page_size: 20, page_size: 20,
}, },
state_:{ state_: {
10:'制定中', 10: '制定中',
20:'已下达', 20: '已下达',
30:'已接受', 30: '已接受',
40:'生产中', 40: '生产中',
50:'已完成', 50: '已完成',
60:'军检完成'}, 60: '军检完成'
},
actstate_: { actstate_: {
6: "待复检", 6: "待复检",
10: "操作进行中", 10: "操作进行中",
@ -177,26 +153,20 @@ export default {
26: "待夹层检验", 26: "待夹层检验",
70: "报废", 70: "报废",
}, },
process_json:null, process_json: null,
productionplanID:null, productionplanID: null,
dialogVisibleForm: false, dialogVisibleForm: false,
tableForm:{
name:'',
},
recordform: defaultrecordform, recordform: defaultrecordform,
dialogType: "new", dialogType: "new",
dialogVisible: false, dialogVisible: false,
dialogType1: "new", dialogType1: "new",
dialogVisible1: false, dialogVisible1: false,
tableForm: defaultrecordform,
checkForm: { checkForm: {
hhh: '', hhh: '',
}, },
recordVisible: false, recordVisible: false,
customfieldList: [], customfieldList: [],
recordform: null,
recordId: null, recordId: null,
fifo_detail: "", fifo_detail: "",
formName: "项目检查表", formName: "项目检查表",
@ -221,93 +191,65 @@ export default {
getProductionplan(this.id).then((response) => { getProductionplan(this.id).then((response) => {
if (response.data) { if (response.data) {
this.productionplan = response.data; this.productionplan = response.data;
this.productionplanID=response.data.id; this.productionplanID = response.data.id;
let process_json = []; let process_json = [];
for(let item in response.data.process_json){ for (let item in response.data.process_json) {
let obj = new Object(); let obj = new Object();
obj = response.data.process_json[item]; obj = response.data.process_json[item];
process_json.push(obj) process_json.push(obj)
} }
this.process_json = process_json;
this.process_json= process_json;
} }
}); });
}, },
getwproductList() {
getwproductList() getwproductList({production_plan: this.id, page: 0,}).then((response) => {
{
getwproductList({production_plan:this.id,page:0,}).then((response) => {
if (response.data) { if (response.data) {
this.wproduct = response.data; this.wproduct = response.data;
} }
}); });
}, },
//查看该玻璃检验记录表 //查看该玻璃检验记录表
handleoption(scope){ handleoption(scope) {
this.$router.push({name: "processcard", params: {id: scope.row.id},})
this.$router.push({name: "processcard", params: { id: scope.row.id }, })
}, },
//查看生产记录 //查看生产记录
select(scope) select(scope) {
{ this.limitedCheckRecord = true;
this.limitedCheckRecord=true; getrecordList({wproduct: scope.row.id, page: 0}).then(res => {
getrecordList({wproduct: scope.row.id,page:0}).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.recordList = res.data; this.recordList = res.data;
} }
}) })
}, },
//点击记录里的查看 //点击记录里的查看
handleRecordDetail(scope) { handleRecordDetail(scope) {
let that = this; let that = this;
that.recordVisible = false; that.fieldList = [];
that.recordId = scope.row.id; recordInit(scope.row.id).then((res) => {
that.recordform = scope.row.form; if (res.code >= 200) {
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; that.recordVisible = true;
}); that.formName = res.data.form_.name;
}); that.fieldList = res.data.record_data;
} }
} })
);
}, },
}, },
}; };
</script> </script>
<style scoped>
.items {
height: 35px;
line-height: 35px;
padding-left: 20px;
}
.itemLabel {
font-size: 14px;
color: #606266;
font-weight: 600;
}
</style>

View File

@ -119,7 +119,6 @@
:title="formName" :title="formName"
:visible.sync="recordVisible" :visible.sync="recordVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
@close="recordCancel"
> >
<el-row> <el-row>
<el-col v-for="item in fieldList" :key="item.id" :span="12"> <el-col v-for="item in fieldList" :key="item.id" :span="12">

View File

@ -3,15 +3,16 @@
<el-card style="margin-top: 2px"> <el-card style="margin-top: 2px">
<el-descriptions title="任务详情" :column="5" border style="margin-bottom: 20px"> <el-descriptions title="任务详情" :column="5" border style="margin-bottom: 20px">
<el-descriptions-item label="任务编号">{{productionplan.number}}</el-descriptions-item> <el-descriptions-item label="任务编号">{{productionplan.number}}</el-descriptions-item>
<el-descriptions-item label="产品名称" v-if="productionplan.product_">{{productionplan.product_.name}}</el-descriptions-item> <el-descriptions-item label="产品名称" v-if="productionplan.product_">{{productionplan.product_.name}}
<el-descriptions-item label="规格型号" v-if="productionplan.product_">{{productionplan.product_.specification}}</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="规格型号" v-if="productionplan.product_">{{productionplan.product_.specification}}
</el-descriptions-item>
<el-descriptions-item label="生产状态">{{state_[productionplan.state]}}</el-descriptions-item> <el-descriptions-item label="生产状态">{{state_[productionplan.state]}}</el-descriptions-item>
<el-descriptions-item label="不合格品数量">{{productionplan.count_notok}}</el-descriptions-item> <el-descriptions-item label="不合格品数量">{{productionplan.count_notok}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-card style="margin-bottom: 20px"> <el-card style="margin-bottom: 20px">
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span>下料清单</span> <span>下料清单</span>
</div> </div>
<el-table <el-table
:data="cut" :data="cut"
@ -20,55 +21,49 @@
stripe stripe
style="width: 100%" style="width: 100%"
> >
<el-table-column label="序号" type="index" width="50"/>
<el-table-column label="序号" type="index" width="50" /> <el-table-column label="玻璃批次">
<template slot-scope="scope">{{ scope.row.from_batch }}</template>
<el-table-column label="玻璃批次" >
<template slot-scope="scope" >{{ scope.row.from_batch }}</template>
</el-table-column> </el-table-column>
<el-table-column label="生产型号" > <el-table-column label="生产型号">
<template slot-scope="scope" >{{ scope.row.from_material_.specification }}</template> <template slot-scope="scope">{{ scope.row.from_material_.specification }}</template>
</el-table-column> </el-table-column>
<el-table-column label="切裁规格" > <el-table-column label="切裁规格">
<template slot-scope="scope" >{{ scope.row.from_material_.specification }}</template> <template slot-scope="scope">{{ scope.row.from_material_.specification }}</template>
</el-table-column> </el-table-column>
<el-table-column label="切裁板数" > <el-table-column label="切裁板数">
<template slot-scope="scope" >{{ scope.row.count_cut }}</template> <template slot-scope="scope">{{ scope.row.count_cut }}</template>
</el-table-column> </el-table-column>
<el-table-column label="切裁片数" > <el-table-column label="切裁片数">
<template slot-scope="scope" >{{ scope.row.count_real }}</template> <template slot-scope="scope">{{ scope.row.count_real }}</template>
</el-table-column> </el-table-column>
<el-table-column label="成品数量" > <el-table-column label="成品数量">
<template slot-scope="scope" >{{ scope.row.count_ok }}</template> <template slot-scope="scope">{{ scope.row.count_ok }}</template>
</el-table-column> </el-table-column>
<el-table-column label="操作人" > <el-table-column label="操作人">
<template slot-scope="scope" >{{ scope.row.create_by_.username }}</template> <template slot-scope="scope">{{ scope.row.create_by_.username }}</template>
</el-table-column> </el-table-column>
<el-table-column label="甩片原因及数量(片)" > <el-table-column label="甩片原因及数量(片)">
<el-table-column label="气泡" > <el-table-column label="气泡">
<template slot-scope="scope" >{{ scope.row.count_qipao }}</template> <template slot-scope="scope">{{ scope.row.count_qipao }}</template>
</el-table-column> </el-table-column>
<el-table-column label="破点" > <el-table-column label="破点">
<template slot-scope="scope" >{{ scope.row.count_podian }}</template> <template slot-scope="scope">{{ scope.row.count_podian }}</template>
</el-table-column> </el-table-column>
<el-table-column label="划伤" > <el-table-column label="划伤">
<template slot-scope="scope" >{{ scope.row.count_hua }}</template> <template slot-scope="scope">{{ scope.row.count_hua }}</template>
</el-table-column> </el-table-column>
<el-table-column label="其他" > <el-table-column label="其他">
<template slot-scope="scope" >{{ scope.row.count_other }}</template> <template slot-scope="scope">{{ scope.row.count_other }}</template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="检验员" > <el-table-column label="检验员">
<template slot-scope="scope" >{{ scope.row.create_by_.username }}</template> <template slot-scope="scope">{{ scope.row.create_by_.username }}</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-tabs v-model="activeName" type="card" > <el-tabs v-model="activeName" type="card">
<el-tab-pane label="玻璃" name="1" > <el-tab-pane label="玻璃" name="1">
<el-table <el-table
:data="wproduct" :data="wproduct"
border border
@ -77,53 +72,43 @@
stripe stripe
style="width: 100%" style="width: 100%"
height="500" height="500"
:load="load"
:tree-props="{children: 'children'}"> :tree-props="{children: 'children'}">
<el-table-column type="index" width="50"/>
<el-table-column type="index" width="50" /> <el-table-column label="玻璃编号">
<template slot-scope="scope">{{ scope.row.number }}</template>
<el-table-column label="玻璃编号" >
<template slot-scope="scope" >{{ scope.row.number }}</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.step_.name {{scope.row.step_.name}}
}}</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.material_.name {{scope.row.material_.name}}
}}</template> </template>
</el-table-column> </el-table-column>
<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 <el-table-column
align="center" align="center"
label="过程记录" label="过程记录"
width="220px" width="220px"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-link <el-link
v-if="checkPermission(['material_delete'])" v-if="checkPermission(['material_delete'])"
type="primary" type="primary"
@click="handleoption(scope)" @click="handleoption(scope)"
>查看</el-link >查看
> </el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="工序" name="2" > <el-tab-pane label="工序" name="2">
<el-table <el-table
:data="process_json" :data="process_json"
border border
@ -132,84 +117,71 @@
style="width: 100%" style="width: 100%"
height="500" height="500"
> >
<el-table-column type="index" width="50"/>
<el-table-column type="index" width="50" /> <el-table-column label="工序名称">
<template slot-scope="scope">{{ scope.row.process_name }}</template>
<el-table-column label="工序名称" >
<template slot-scope="scope" >{{ scope.row.process_name }}</template>
</el-table-column> </el-table-column>
<el-table-column label="玻璃数量" > <el-table-column label="玻璃数量">
<template slot-scope="scope" >{{ scope.row.count_real }}</template> <template slot-scope="scope">{{ scope.row.count_real }}</template>
</el-table-column> </el-table-column>
<el-table-column label="合格数量">
<el-table-column label="合格数量" > <template slot-scope="scope">{{ scope.row.count_ok }}</template>
<template slot-scope="scope" >{{ scope.row.count_ok }}</template>
</el-table-column> </el-table-column>
<el-table-column label="不合格数量">
<el-table-column label="不合格数量" > <template slot-scope="scope">{{ scope.row.count_notok }}</template>
<template slot-scope="scope" >{{ scope.row.count_notok }}</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 <el-link
v-if="checkPermission(['material_delete'])" v-if="checkPermission(['material_delete'])"
type="primary" type="primary"
@click="handleprocess(scope)" @click="handleprocess(scope)"
>查看</el-link >查看
> </el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import { getProductionplan,getsubproductionplanList } from "@/api/pm"; import {getProductionplan, getsubproductionplanList} from "@/api/pm";
import { getwproductList,getcutList} from "@/api/wpm"; import {getwproductList, getcutList} from "@/api/wpm";
import checkPermission from "@/utils/permission"; import checkPermission from "@/utils/permission";
import {getTestRecord} from "@/api/qm"; import {getTestRecord} 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 {
components: { Pagination }, components: {Pagination},
data() { data() {
return { return {
productionplan:{ productionplan: {
number:"" number: ""
}, },
cut:[], cut: [],
activeName:"1", activeName: "1",
wproduct:[], wproduct: [],
subproductionplanList: "", subproductionplanList: "",
listQuery: { listQuery: {
page: 1, page: 1,
page_size: 20, page_size: 20,
}, },
state_:{ state_: {
10:'制定中', 10: '制定中',
20:'已下达', 20: '已下达',
30:'已接受', 30: '已接受',
40:'生产中', 40: '生产中',
50:'已完成', 50: '已完成',
60:'军检完成'}, 60: '军检完成'
},
actstate_: { actstate_: {
6: "待复检", 6: "待复检",
10: "操作进行中", 10: "操作进行中",
@ -222,8 +194,8 @@ export default {
26: "待夹层检验", 26: "待夹层检验",
70: "报废", 70: "报废",
}, },
process_json:null, process_json: null,
productionplanID:null, productionplanID: null,
}; };
}, },
computed: {}, computed: {},
@ -243,24 +215,24 @@ export default {
getProductionplan(this.id).then((response) => { getProductionplan(this.id).then((response) => {
if (response.data) { if (response.data) {
this.productionplan = response.data; this.productionplan = response.data;
this.productionplanID=response.data.id; this.productionplanID = response.data.id;
let process_json = []; let process_json = [];
for(let item in response.data.process_json){ for (let item in response.data.process_json) {
let obj = new Object(); let obj = new Object();
obj = response.data.process_json[item]; obj = response.data.process_json[item];
process_json.push(obj) process_json.push(obj)
} }
this.process_json= process_json; this.process_json = process_json;
} }
}); });
}, },
getspList() { getspList() {
getsubproductionplanList({page:0,production_plan:this.id}).then((response) => { getsubproductionplanList({page: 0, production_plan: this.id}).then((response) => {
if (response.data) { if (response.data) {
this.subproductionplanList = response.data; this.subproductionplanList = response.data;
} }
@ -268,9 +240,8 @@ export default {
}); });
}, },
getwproductList() getwproductList() {
{ getwproductList({production_plan: this.id, page: 0,}).then((response) => {
getwproductList({production_plan:this.id,page:0,}).then((response) => {
if (response.data) { if (response.data) {
this.wproduct = response.data; this.wproduct = response.data;
} }
@ -278,9 +249,8 @@ export default {
}); });
}, },
//下料清单 //下料清单
gecutList() gecutList() {
{ getcutList({production_plan: this.id, page: 0}).then((response) => {
getcutList({production_plan:this.id,page:0}).then((response) => {
if (response.data) { if (response.data) {
this.cut = response.data; this.cut = response.data;
} }
@ -289,17 +259,25 @@ export default {
}, },
//查看该玻璃检验记录表 //查看该玻璃检验记录表
handleoption(scope){ handleoption(scope) {
this.$router.push({name: "taskrecordfrom", params: { id: scope.row.id ,productionplanid:this.id ,number:scope.row.number,process:scope.row.step_.name}, }) this.$router.push({
name: "taskrecordfrom",
params: {
id: scope.row.id,
productionplanid: this.id,
number: scope.row.number,
process: scope.row.step_.name
},
})
}, },
//查看工序对应的玻璃 //查看工序对应的玻璃
handleprocess (scope){ handleprocess(scope) {
this.$router.push({name: "wproduct", params: { id: scope.row.process,productionplanid:this.id} }) this.$router.push({name: "wproduct", params: {id: scope.row.process, productionplanid: this.id}})
} }
}, },
}; };
</script> </script>

View File

@ -46,7 +46,6 @@
:title="formName" :title="formName"
:visible.sync="recordVisible" :visible.sync="recordVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
@close="recordCancel"
> >
<el-row> <el-row>
<el-col v-for="item in fieldList" :key="item.id" :span="12"> <el-col v-for="item in fieldList" :key="item.id" :span="12">

View File

@ -613,6 +613,27 @@
<el-button type="primary" @click="retrialSubmit"> </el-button> <el-button type="primary" @click="retrialSubmit"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!--已完成检查表查看-->
<el-dialog
:title="formName"
:visible.sync="recordFinishedVisible"
:close-on-click-modal="false"
>
<el-row>
<el-col v-for="item in fieldList" :key="item.id" :span="12">
<div class="items" v-if="item.field_type!=='draw'">
<span class="itemLabel">{{item.field_name}}</span>
<span>{{item.field_value}}</span>
</div>
</el-col>
<el-col v-for="item in fieldList" :key="item.id" :span="24">
<div class="items" v-if="item.field_type==='draw'" style="height: 400px">
<span class="itemLabel">{{item.field_name}}</span>
<img style="width: 45%;vertical-align: text-top;" :src="'http://47.95.0.242:2222'+item.field_value"/>
</div>
</el-col>
</el-row>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -755,6 +776,7 @@
dialogFormVisible: false, dialogFormVisible: false,
dialogFormVisibles: false, dialogFormVisibles: false,
limitedCheckRecord: false, limitedCheckRecord: false,
recordFinishedVisible: false,
testrecord: {}, testrecord: {},
retrialItem: {},//复检对象 retrialItem: {},//复检对象
retrialResponse: {},//复检对象 retrialResponse: {},//复检对象
@ -862,13 +884,10 @@
handleRetrial(scope) { handleRetrial(scope) {
let that = this; let that = this;
this.retrialItem = Object.assign({}, scope.row); this.retrialItem = Object.assign({}, scope.row);
console.log(this.retrialItem);
getRetrial(scope.row.id).then(res => { getRetrial(scope.row.id).then(res => {
that.retrialResponse = res.data; that.retrialResponse = res.data;
getWorkflowInit(res.data.workflow).then((response) => { getWorkflowInit(res.data.workflow).then((response) => {
if (response.data) { if (response.data) {
debugger;
console.log(response.data);
that.retrialForm.transition = response.data.transitions[0].id; that.retrialForm.transition = response.data.transitions[0].id;
that.customfieldList = response.data.field_list; that.customfieldList = response.data.field_list;
for (let i = 0; i < that.customfieldList.length; i++) { for (let i = 0; i < that.customfieldList.length; i++) {
@ -926,10 +945,8 @@
if (response.data) { if (response.data) {
this.wproductList3 = response.data; this.wproductList3 = response.data;
} }
}); });
}, },
//半成品批量入库 //半成品批量入库
handleCreate() { handleCreate() {
this.dialogFormVisibles = true; this.dialogFormVisibles = true;
@ -941,7 +958,6 @@
_this.mutipID = []; _this.mutipID = [];
this.$refs.multipleTable.selection.forEach((item) => { this.$refs.multipleTable.selection.forEach((item) => {
_this.mutipID.push(item.id); _this.mutipID.push(item.id);
}); });
createputins({ createputins({
warehouse: this.form.warehouse, warehouse: this.form.warehouse,
@ -1093,44 +1109,13 @@
handleRecordDetail(scope) { handleRecordDetail(scope) {
let that = this; let that = this;
that.fieldList = []; 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) => { getTestRecordItem(scope.row.id).then((res) => {
let arr = []; if (res.code >= 200) {
let fieldList = res.data.record_data; that.recordFinishedVisible = true;
for (let i = 0; i < that.fieldList.length; i++) { that.formName = res.data.form_.name;
let obj = that.fieldList[i]; that.fieldList = res.data.record_data;
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;
});
}) })
}
});
}, },
//半产品复检 //半产品复检
handleReview() { handleReview() {
@ -1331,3 +1316,16 @@
} }
} }
</script> </script>
<style scoped>
.items {
height: 35px;
line-height: 35px;
padding-left: 20px;
}
.itemLabel {
font-size: 14px;
color: #606266;
font-weight: 600;
}
</style>