Merge branch 'develop' of https://e.coding.net/ctcdevteam/hberp/hberp into develop
This commit is contained in:
commit
e5bef0f5ef
|
@ -19,7 +19,7 @@
|
|||
@expand-change="handlerExpand"
|
||||
: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 label="产品名称" prop="productName" width="120" show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
|
|
|
@ -30,6 +30,17 @@
|
|||
<div>累计不合格产品数</div>
|
||||
</div>
|
||||
</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-col :span="12">
|
||||
<el-card style="border-radius: 10px;">
|
||||
|
@ -108,7 +119,7 @@
|
|||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="dashboardSubRow" :gutter="5">
|
||||
<!--<el-row class="dashboardSubRow" :gutter="5">
|
||||
<el-col :span="12">
|
||||
<el-card style="border-radius: 10px;">
|
||||
<div class="dashboardCardHand">
|
||||
|
@ -116,7 +127,7 @@
|
|||
<span class="verticalLine"></span><span class="dashboardCardTitle">库存列表</span>
|
||||
<span class="stockMore" @click="stockMore">更多>></span>
|
||||
</div>
|
||||
<!--<div class="dashboardCardTitle">库存列表 </div>-->
|
||||
<!–<div class="dashboardCardTitle">库存列表 </div>–>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page.sync="stockPage"
|
||||
|
@ -164,7 +175,7 @@
|
|||
<div class="CardTitleWrap">
|
||||
<span class="verticalLine"></span><span class="dashboardCardTitle">提醒</span>
|
||||
</div>
|
||||
<!--<div class="dashboardCardTitle">提醒</div>-->
|
||||
<!–<div class="dashboardCardTitle">提醒</div>–>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
:current-page.sync="remindPage"
|
||||
|
@ -190,7 +201,7 @@
|
|||
<span>{{item}}</span><span>2021-12-20</span>
|
||||
</div>
|
||||
</li>
|
||||
<!--<li class="listItem">
|
||||
<!–<li class="listItem">
|
||||
<div class="itemText">
|
||||
<span>玻璃低于安全库存</span><span>2021-11-30</span>
|
||||
</div>
|
||||
|
@ -199,7 +210,7 @@
|
|||
<div class="itemText">
|
||||
<span>某某批货临近交货日期</span><span>2021-11-20</span>
|
||||
</div>
|
||||
</li>-->
|
||||
</li>–>
|
||||
</ul>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="临近交货" name="临近交货">
|
||||
|
@ -233,20 +244,23 @@
|
|||
</el-tabs>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from 'echarts'
|
||||
import { mapGetters } from 'vuex';
|
||||
import {getPlanGantt} from "@/api/srm";
|
||||
import { getMaterialList } from "@/api/mtm";
|
||||
import gantt from "@/components/Gantt/index";
|
||||
import { getInventoryList } from "@/api/inm";
|
||||
import { getProductionplanList} from "@/api/pm";
|
||||
import { getmaterialbatchList } from "@/api/inm";
|
||||
import { getContractList , getOrderList } from "@/api/sam";
|
||||
|
||||
export default {
|
||||
components: { gantt },
|
||||
name: 'Dashboard',
|
||||
data() {
|
||||
return {
|
||||
|
@ -266,6 +280,7 @@ export default {
|
|||
chartIndex:null,
|
||||
tableDate:'2021-12',
|
||||
chartDate:'2021-12',
|
||||
proList: [],
|
||||
planList:[],
|
||||
stockList:[],
|
||||
remindList:[],
|
||||
|
@ -654,6 +669,78 @@ export default {
|
|||
handleRemindCurrentChange(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 () {
|
||||
|
@ -665,6 +752,7 @@ export default {
|
|||
this.drawChart();
|
||||
this.getPlanList();
|
||||
this.getStockList();
|
||||
this.getGanttData();
|
||||
this.getStatisticsData();
|
||||
},
|
||||
updated () {
|
||||
|
|
|
@ -1,313 +1,255 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-descriptions title="任务详情" :column="4" border style="margin-bottom: 20px">
|
||||
<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_.specification}}</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="计划开工时间">{{productionplan.start_date}}</el-descriptions-item>
|
||||
<el-descriptions-item label="计划完工时间">{{productionplan.end_date}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
||||
|
||||
<el-table
|
||||
:data="wproduct"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
height="500"
|
||||
>
|
||||
|
||||
<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" >{{
|
||||
scope.row.step_.name
|
||||
}}</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>
|
||||
<el-table-column label="最后检验结果">
|
||||
<template slot-scope="scope" >
|
||||
<el-span v-if="scope.row.last_test_result==false">不合格</el-span>
|
||||
<el-span v-if="scope.row.last_test_result==true">合格</el-span>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产记录">
|
||||
<template slot-scope="scope" >
|
||||
<el-button @click="select(scope)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
<el-descriptions title="任务详情" :column="4" border style="margin-bottom: 20px">
|
||||
<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_.specification}}
|
||||
</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="计划开工时间">{{productionplan.start_date}}</el-descriptions-item>
|
||||
<el-descriptions-item label="计划完工时间">{{productionplan.end_date}}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-table
|
||||
:data="wproduct"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
height="500"
|
||||
>
|
||||
<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">
|
||||
{{scope.row.step_.name}}
|
||||
</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>
|
||||
<el-table-column label="最后检验结果">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.last_test_result==false">不合格</span>
|
||||
<span v-if="scope.row.last_test_result==true">合格</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产记录">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="select(scope)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="操作"
|
||||
width="220px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-link
|
||||
v-if="checkPermission(['material_delete'])"
|
||||
type="primary"
|
||||
@click="handleoption(scope)"
|
||||
>生成流程卡</el-link
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
|
||||
<!--检验记录-->
|
||||
<el-dialog title="检验记录" :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 align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<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 title="检验记录" :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 align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<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-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>
|
||||
</el-card>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { getProductionplan,getsubproductionplanList } from "@/api/pm";
|
||||
import { getwproductList,getrecordList} from "@/api/wpm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import customForm from '@/components/customForm/index'
|
||||
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() {
|
||||
return {
|
||||
productionplan:{
|
||||
number:""
|
||||
},
|
||||
activeName:"1",
|
||||
wproduct:[],
|
||||
recordList:[],
|
||||
limitedCheckRecord:false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
state_:{
|
||||
10:'制定中',
|
||||
20:'已下达',
|
||||
30:'已接受',
|
||||
40:'生产中',
|
||||
50:'已完成',
|
||||
60:'军检完成'},
|
||||
actstate_: {
|
||||
6: "待复检",
|
||||
10: "操作进行中",
|
||||
20: "待检验",
|
||||
30: "已合格",
|
||||
40: "库存中",
|
||||
50: "不合格",
|
||||
60: "待成品检验",
|
||||
8: "操作准备中",
|
||||
26: "待夹层检验",
|
||||
70: "报废",
|
||||
},
|
||||
process_json:null,
|
||||
productionplanID:null,
|
||||
dialogVisibleForm: false,
|
||||
tableForm:{
|
||||
name:'',
|
||||
import {getProductionplan} from "@/api/pm";
|
||||
import {getwproductList, getrecordList,recordInit} from "@/api/wpm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
const defaultrecordform = {enabled: false};
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
productionplan: {
|
||||
number: ""
|
||||
},
|
||||
|
||||
activeName: "1",
|
||||
wproduct: [],
|
||||
recordList: [],
|
||||
limitedCheckRecord: false,
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
state_: {
|
||||
10: '制定中',
|
||||
20: '已下达',
|
||||
30: '已接受',
|
||||
40: '生产中',
|
||||
50: '已完成',
|
||||
60: '军检完成'
|
||||
},
|
||||
actstate_: {
|
||||
6: "待复检",
|
||||
10: "操作进行中",
|
||||
20: "待检验",
|
||||
30: "已合格",
|
||||
40: "库存中",
|
||||
50: "不合格",
|
||||
60: "待成品检验",
|
||||
8: "操作准备中",
|
||||
26: "待夹层检验",
|
||||
70: "报废",
|
||||
},
|
||||
process_json: null,
|
||||
productionplanID: null,
|
||||
dialogVisibleForm: false,
|
||||
recordform: defaultrecordform,
|
||||
dialogType: "new",
|
||||
dialogVisible: false,
|
||||
dialogType1: "new",
|
||||
dialogVisible1: false,
|
||||
tableForm: defaultrecordform,
|
||||
checkForm: {
|
||||
hhh: '',
|
||||
},
|
||||
|
||||
|
||||
recordVisible: false,
|
||||
customfieldList: [],
|
||||
recordform: null,
|
||||
recordId: null,
|
||||
fifo_detail: "",
|
||||
formName: "项目检查表",
|
||||
hasPicture: false,
|
||||
fieldList: [],
|
||||
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.getList();
|
||||
|
||||
this.getwproductList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
customfieldList: [],
|
||||
recordId: null,
|
||||
fifo_detail: "",
|
||||
formName: "项目检查表",
|
||||
hasPicture: false,
|
||||
fieldList: [],
|
||||
|
||||
getList() {
|
||||
getProductionplan(this.id).then((response) => {
|
||||
if (response.data) {
|
||||
this.productionplan = response.data;
|
||||
this.productionplanID=response.data.id;
|
||||
|
||||
let process_json = [];
|
||||
for(let item in response.data.process_json){
|
||||
let obj = new Object();
|
||||
obj = response.data.process_json[item];
|
||||
process_json.push(obj)
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.getList();
|
||||
|
||||
this.getwproductList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
getList() {
|
||||
getProductionplan(this.id).then((response) => {
|
||||
if (response.data) {
|
||||
this.productionplan = response.data;
|
||||
this.productionplanID = response.data.id;
|
||||
|
||||
let process_json = [];
|
||||
for (let item in response.data.process_json) {
|
||||
let obj = new Object();
|
||||
obj = response.data.process_json[item];
|
||||
process_json.push(obj)
|
||||
}
|
||||
this.process_json = process_json;
|
||||
}
|
||||
|
||||
|
||||
this.process_json= process_json;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
getwproductList()
|
||||
{
|
||||
getwproductList({production_plan:this.id,page:0,}).then((response) => {
|
||||
if (response.data) {
|
||||
this.wproduct = response.data;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
//查看该玻璃检验记录表
|
||||
handleoption(scope){
|
||||
|
||||
this.$router.push({name: "processcard", params: { id: scope.row.id }, })
|
||||
|
||||
},
|
||||
//查看生产记录
|
||||
select(scope)
|
||||
{
|
||||
this.limitedCheckRecord=true;
|
||||
getrecordList({wproduct: scope.row.id,page:0}).then(res => {
|
||||
});
|
||||
},
|
||||
getwproductList() {
|
||||
getwproductList({production_plan: this.id, page: 0,}).then((response) => {
|
||||
if (response.data) {
|
||||
this.wproduct = response.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
//查看该玻璃检验记录表
|
||||
handleoption(scope) {
|
||||
this.$router.push({name: "processcard", params: {id: scope.row.id},})
|
||||
},
|
||||
//查看生产记录
|
||||
select(scope) {
|
||||
this.limitedCheckRecord = true;
|
||||
getrecordList({wproduct: scope.row.id, page: 0}).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.recordList = res.data;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//点击记录里的查看
|
||||
handleRecordDetail(scope) {
|
||||
let that = this;
|
||||
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;
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
})
|
||||
},
|
||||
//点击记录里的查看
|
||||
handleRecordDetail(scope) {
|
||||
let that = this;
|
||||
that.fieldList = [];
|
||||
recordInit(scope.row.id).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
that.recordVisible = true;
|
||||
that.formName = res.data.form_.name;
|
||||
that.fieldList = res.data.record_data;
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.items {
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.itemLabel {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -119,7 +119,6 @@
|
|||
:title="formName"
|
||||
:visible.sync="recordVisible"
|
||||
:close-on-click-modal="false"
|
||||
@close="recordCancel"
|
||||
>
|
||||
<el-row>
|
||||
<el-col v-for="item in fieldList" :key="item.id" :span="12">
|
||||
|
|
|
@ -1,305 +1,283 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-card style="margin-top: 2px">
|
||||
<el-descriptions title="任务详情" :column="5" border style="margin-bottom: 20px">
|
||||
<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_.specification}}</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>
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>下料清单</span>
|
||||
|
||||
</div>
|
||||
<el-table
|
||||
:data="cut"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
>
|
||||
|
||||
<el-table-column label="序号" type="index" width="50" />
|
||||
|
||||
|
||||
<el-table-column label="玻璃批次" >
|
||||
<template slot-scope="scope" >{{ scope.row.from_batch }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产型号" >
|
||||
<template slot-scope="scope" >{{ scope.row.from_material_.specification }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="切裁规格" >
|
||||
<template slot-scope="scope" >{{ scope.row.from_material_.specification }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="切裁板数" >
|
||||
<template slot-scope="scope" >{{ scope.row.count_cut }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="切裁片数" >
|
||||
<template slot-scope="scope" >{{ scope.row.count_real }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成品数量" >
|
||||
<template slot-scope="scope" >{{ scope.row.count_ok }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人" >
|
||||
<template slot-scope="scope" >{{ scope.row.create_by_.username }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="甩片原因及数量(片)" >
|
||||
<el-table-column label="气泡" >
|
||||
<template slot-scope="scope" >{{ scope.row.count_qipao }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="破点" >
|
||||
<template slot-scope="scope" >{{ scope.row.count_podian }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="划伤" >
|
||||
<template slot-scope="scope" >{{ scope.row.count_hua }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="其他" >
|
||||
<template slot-scope="scope" >{{ scope.row.count_other }}</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验员" >
|
||||
<template slot-scope="scope" >{{ scope.row.create_by_.username }}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-tabs v-model="activeName" type="card" >
|
||||
<el-tab-pane label="玻璃" name="1" >
|
||||
<el-descriptions title="任务详情" :column="5" border style="margin-bottom: 20px">
|
||||
<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_.specification}}
|
||||
</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>
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>下料清单</span>
|
||||
</div>
|
||||
<el-table
|
||||
: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" />
|
||||
|
||||
|
||||
<el-table-column label="玻璃编号" >
|
||||
<template slot-scope="scope" >{{ scope.row.number }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="所在子工序">
|
||||
<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" >{{
|
||||
actstate_[scope.row.act_state]
|
||||
}}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="过程记录"
|
||||
width="220px"
|
||||
:data="cut"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-link
|
||||
v-if="checkPermission(['material_delete'])"
|
||||
type="primary"
|
||||
@click="handleoption(scope)"
|
||||
>查看</el-link
|
||||
<el-table-column label="序号" type="index" width="50"/>
|
||||
<el-table-column label="玻璃批次">
|
||||
<template slot-scope="scope">{{ scope.row.from_batch }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="生产型号">
|
||||
<template slot-scope="scope">{{ scope.row.from_material_.specification }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="切裁规格">
|
||||
<template slot-scope="scope">{{ scope.row.from_material_.specification }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="切裁板数">
|
||||
<template slot-scope="scope">{{ scope.row.count_cut }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="切裁片数">
|
||||
<template slot-scope="scope">{{ scope.row.count_real }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成品数量">
|
||||
<template slot-scope="scope">{{ scope.row.count_ok }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作人">
|
||||
<template slot-scope="scope">{{ scope.row.create_by_.username }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="甩片原因及数量(片)">
|
||||
<el-table-column label="气泡">
|
||||
<template slot-scope="scope">{{ scope.row.count_qipao }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="破点">
|
||||
<template slot-scope="scope">{{ scope.row.count_podian }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="划伤">
|
||||
<template slot-scope="scope">{{ scope.row.count_hua }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="其他">
|
||||
<template slot-scope="scope">{{ scope.row.count_other }}</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="检验员">
|
||||
<template slot-scope="scope">{{ scope.row.create_by_.username }}</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-tabs v-model="activeName" type="card">
|
||||
<el-tab-pane label="玻璃" name="1">
|
||||
<el-table
|
||||
:data="wproduct"
|
||||
border
|
||||
fit
|
||||
row-key="id"
|
||||
stripe
|
||||
style="width: 100%"
|
||||
height="500"
|
||||
:tree-props="{children: 'children'}">
|
||||
<el-table-column type="index" 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">
|
||||
{{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">
|
||||
{{actstate_[scope.row.act_state]}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="过程记录"
|
||||
width="220px"
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="工序" name="2" >
|
||||
<el-table
|
||||
:data="process_json"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
height="500"
|
||||
>
|
||||
|
||||
<el-table-column type="index" width="50" />
|
||||
|
||||
|
||||
<el-table-column label="工序名称" >
|
||||
<template slot-scope="scope" >{{ scope.row.process_name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="玻璃数量" >
|
||||
<template slot-scope="scope" >{{ scope.row.count_real }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="合格数量" >
|
||||
<template slot-scope="scope" >{{ scope.row.count_ok }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="不合格数量" >
|
||||
<template slot-scope="scope" >{{ scope.row.count_notok }}</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="过程记录"
|
||||
width="220px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
|
||||
<el-link
|
||||
v-if="checkPermission(['material_delete'])"
|
||||
type="primary"
|
||||
@click="handleprocess(scope)"
|
||||
>查看</el-link
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['material_delete'])"
|
||||
type="primary"
|
||||
@click="handleoption(scope)"
|
||||
>查看
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="工序" name="2">
|
||||
<el-table
|
||||
:data="process_json"
|
||||
border
|
||||
fit
|
||||
stripe
|
||||
style="width: 100%"
|
||||
height="500"
|
||||
>
|
||||
<el-table-column type="index" width="50"/>
|
||||
<el-table-column label="工序名称">
|
||||
<template slot-scope="scope">{{ scope.row.process_name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="玻璃数量">
|
||||
<template slot-scope="scope">{{ scope.row.count_real }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="合格数量">
|
||||
<template slot-scope="scope">{{ scope.row.count_ok }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="不合格数量">
|
||||
<template slot-scope="scope">{{ scope.row.count_notok }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
align="center"
|
||||
label="过程记录"
|
||||
width="220px"
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
<template slot-scope="scope">
|
||||
<el-link
|
||||
v-if="checkPermission(['material_delete'])"
|
||||
type="primary"
|
||||
@click="handleprocess(scope)"
|
||||
>查看
|
||||
</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-card>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import { getProductionplan,getsubproductionplanList } from "@/api/pm";
|
||||
import { getwproductList,getcutList} from "@/api/wpm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import {getProductionplan, getsubproductionplanList} from "@/api/pm";
|
||||
import {getwproductList, getcutList} from "@/api/wpm";
|
||||
import checkPermission from "@/utils/permission";
|
||||
|
||||
import {getTestRecord} from "@/api/qm";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
import {getTestRecord} from "@/api/qm";
|
||||
import Pagination from "@/components/Pagination"; // secondary package based on el-pagination
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data() {
|
||||
return {
|
||||
productionplan:{
|
||||
number:""
|
||||
},
|
||||
cut:[],
|
||||
activeName:"1",
|
||||
wproduct:[],
|
||||
subproductionplanList: "",
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
state_:{
|
||||
10:'制定中',
|
||||
20:'已下达',
|
||||
30:'已接受',
|
||||
40:'生产中',
|
||||
50:'已完成',
|
||||
60:'军检完成'},
|
||||
actstate_: {
|
||||
6: "待复检",
|
||||
10: "操作进行中",
|
||||
20: "待检验",
|
||||
30: "已合格",
|
||||
40: "库存中",
|
||||
50: "不合格",
|
||||
60: "待成品检验",
|
||||
8: "操作准备中",
|
||||
26: "待夹层检验",
|
||||
70: "报废",
|
||||
},
|
||||
process_json:null,
|
||||
productionplanID:null,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.getList();
|
||||
this.gecutList();
|
||||
this.getspList();
|
||||
this.getwproductList();
|
||||
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
export default {
|
||||
components: {Pagination},
|
||||
data() {
|
||||
return {
|
||||
productionplan: {
|
||||
number: ""
|
||||
},
|
||||
cut: [],
|
||||
activeName: "1",
|
||||
wproduct: [],
|
||||
subproductionplanList: "",
|
||||
listQuery: {
|
||||
page: 1,
|
||||
page_size: 20,
|
||||
},
|
||||
state_: {
|
||||
10: '制定中',
|
||||
20: '已下达',
|
||||
30: '已接受',
|
||||
40: '生产中',
|
||||
50: '已完成',
|
||||
60: '军检完成'
|
||||
},
|
||||
actstate_: {
|
||||
6: "待复检",
|
||||
10: "操作进行中",
|
||||
20: "待检验",
|
||||
30: "已合格",
|
||||
40: "库存中",
|
||||
50: "不合格",
|
||||
60: "待成品检验",
|
||||
8: "操作准备中",
|
||||
26: "待夹层检验",
|
||||
70: "报废",
|
||||
},
|
||||
process_json: null,
|
||||
productionplanID: null,
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
watch: {},
|
||||
created() {
|
||||
this.id = this.$route.params.id;
|
||||
this.getList();
|
||||
this.gecutList();
|
||||
this.getspList();
|
||||
this.getwproductList();
|
||||
|
||||
getList() {
|
||||
getProductionplan(this.id).then((response) => {
|
||||
if (response.data) {
|
||||
this.productionplan = response.data;
|
||||
this.productionplanID=response.data.id;
|
||||
|
||||
let process_json = [];
|
||||
for(let item in response.data.process_json){
|
||||
let obj = new Object();
|
||||
obj = response.data.process_json[item];
|
||||
process_json.push(obj)
|
||||
},
|
||||
methods: {
|
||||
checkPermission,
|
||||
|
||||
getList() {
|
||||
getProductionplan(this.id).then((response) => {
|
||||
if (response.data) {
|
||||
this.productionplan = response.data;
|
||||
this.productionplanID = response.data.id;
|
||||
|
||||
let process_json = [];
|
||||
for (let item in response.data.process_json) {
|
||||
let obj = new Object();
|
||||
obj = response.data.process_json[item];
|
||||
process_json.push(obj)
|
||||
}
|
||||
|
||||
|
||||
this.process_json = process_json;
|
||||
}
|
||||
|
||||
|
||||
this.process_json= process_json;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
getspList() {
|
||||
|
||||
getsubproductionplanList({page:0,production_plan:this.id}).then((response) => {
|
||||
if (response.data) {
|
||||
this.subproductionplanList = response.data;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
getwproductList()
|
||||
{
|
||||
getwproductList({production_plan:this.id,page:0,}).then((response) => {
|
||||
if (response.data) {
|
||||
this.wproduct = response.data;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
//下料清单
|
||||
gecutList()
|
||||
{
|
||||
getcutList({production_plan:this.id,page:0}).then((response) => {
|
||||
if (response.data) {
|
||||
this.cut = response.data;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
//查看该玻璃检验记录表
|
||||
handleoption(scope){
|
||||
|
||||
this.$router.push({name: "taskrecordfrom", params: { id: scope.row.id ,productionplanid:this.id ,number:scope.row.number,process:scope.row.step_.name}, })
|
||||
|
||||
},
|
||||
//查看工序对应的玻璃
|
||||
handleprocess (scope){
|
||||
});
|
||||
},
|
||||
getspList() {
|
||||
|
||||
this.$router.push({name: "wproduct", params: { id: scope.row.process,productionplanid:this.id} })
|
||||
|
||||
}
|
||||
},
|
||||
};
|
||||
getsubproductionplanList({page: 0, production_plan: this.id}).then((response) => {
|
||||
if (response.data) {
|
||||
this.subproductionplanList = response.data;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
getwproductList() {
|
||||
getwproductList({production_plan: this.id, page: 0,}).then((response) => {
|
||||
if (response.data) {
|
||||
this.wproduct = response.data;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
//下料清单
|
||||
gecutList() {
|
||||
getcutList({production_plan: this.id, page: 0}).then((response) => {
|
||||
if (response.data) {
|
||||
this.cut = response.data;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
//查看该玻璃检验记录表
|
||||
handleoption(scope) {
|
||||
|
||||
this.$router.push({
|
||||
name: "taskrecordfrom",
|
||||
params: {
|
||||
id: scope.row.id,
|
||||
productionplanid: this.id,
|
||||
number: scope.row.number,
|
||||
process: scope.row.step_.name
|
||||
},
|
||||
})
|
||||
|
||||
},
|
||||
//查看工序对应的玻璃
|
||||
handleprocess(scope) {
|
||||
|
||||
this.$router.push({name: "wproduct", params: {id: scope.row.process, productionplanid: this.id}})
|
||||
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -46,7 +46,6 @@
|
|||
:title="formName"
|
||||
:visible.sync="recordVisible"
|
||||
:close-on-click-modal="false"
|
||||
@close="recordCancel"
|
||||
>
|
||||
<el-row>
|
||||
<el-col v-for="item in fieldList" :key="item.id" :span="12">
|
||||
|
|
|
@ -613,6 +613,27 @@
|
|||
<el-button type="primary" @click="retrialSubmit">确 定</el-button>
|
||||
</div>
|
||||
</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>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -755,6 +776,7 @@
|
|||
dialogFormVisible: false,
|
||||
dialogFormVisibles: false,
|
||||
limitedCheckRecord: false,
|
||||
recordFinishedVisible: false,
|
||||
testrecord: {},
|
||||
retrialItem: {},//复检对象
|
||||
retrialResponse: {},//复检对象
|
||||
|
@ -862,13 +884,10 @@
|
|||
handleRetrial(scope) {
|
||||
let that = this;
|
||||
this.retrialItem = Object.assign({}, scope.row);
|
||||
console.log(this.retrialItem);
|
||||
getRetrial(scope.row.id).then(res => {
|
||||
that.retrialResponse = res.data;
|
||||
getWorkflowInit(res.data.workflow).then((response) => {
|
||||
if (response.data) {
|
||||
debugger;
|
||||
console.log(response.data);
|
||||
that.retrialForm.transition = response.data.transitions[0].id;
|
||||
that.customfieldList = response.data.field_list;
|
||||
for (let i = 0; i < that.customfieldList.length; i++) {
|
||||
|
@ -926,10 +945,8 @@
|
|||
if (response.data) {
|
||||
this.wproductList3 = response.data;
|
||||
}
|
||||
|
||||
});
|
||||
},
|
||||
|
||||
//半成品批量入库
|
||||
handleCreate() {
|
||||
this.dialogFormVisibles = true;
|
||||
|
@ -941,7 +958,6 @@
|
|||
_this.mutipID = [];
|
||||
this.$refs.multipleTable.selection.forEach((item) => {
|
||||
_this.mutipID.push(item.id);
|
||||
|
||||
});
|
||||
createputins({
|
||||
warehouse: this.form.warehouse,
|
||||
|
@ -1093,44 +1109,13 @@
|
|||
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;
|
||||
});
|
||||
})
|
||||
getTestRecordItem(scope.row.id).then((res) => {
|
||||
if (res.code >= 200) {
|
||||
that.recordFinishedVisible = true;
|
||||
that.formName = res.data.form_.name;
|
||||
that.fieldList = res.data.record_data;
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
//半产品复检
|
||||
handleReview() {
|
||||
|
@ -1331,3 +1316,16 @@
|
|||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.items {
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.itemLabel {
|
||||
font-size: 14px;
|
||||
color: #606266;
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue