2.技术准备,导入导出
3.修复班组人员设置/取消班长时,foreman未正确赋值的bug
4.增加光电报工
5.临时优化,划线,切割报工时存在无套料图号的任务,导致数据不显示的情况发生
master
董哲奇 3 weeks ago
parent 8e2ea8f1ba
commit 2fdebc9806

@ -0,0 +1,86 @@
<template>
<el-container>
<el-header style="width: 100%">
<VxeForm :data="formData.data" :items="formData.items" />
</el-header>
<el-container style="padding-top: 10px">
<el-container>
<el-main>
<VxeGrid ref="bFangRef" :scroll-y="{enabled: true}" :scroll-x="{enabled: true,gt:10}" v-bind="gridOptions" />
</el-main>
</el-container>
</el-container>
</el-container>
</template>
<script>
import init from "@/views/cxtj/index";
export default {
name:'CXTJ',
data(){
return{
formData:{
data:{},
items:[]
},
gridOptions:{},
}
},
created(){
const {formData,formItems,options,columns}=init(this.$route.path)
this.formData.data=formData
this.formData.items=formItems
this.gridOptions=options
this.gridOptions.columns=columns
},
}
</script>
<style lang="scss" scoped>
.el-header {
margin: 0;
padding: 5px 0;
height: auto;
}
.el-container {
padding: 0;
margin: 0;
}
.el-main {
padding: 0;
}
.el-col {
padding: 0;
}
.el-aside {
background: #fff;
padding: 0;
}
.el-container {
padding: 0;
}
.el-row {
margin-bottom: 5px;
}
.el-row:last-child {
margin-bottom: 0;
}
.tableStyles {
background: #0a76a4;
}
.my-dropdown {
width: 450px;
height: 250px;
background-color: #fff;
border: 1px solid #dcdfe6;
box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
font-size: 12px;
}
::v-deep .mytable .vxe-input {
display: flex !important;
}
::v-deep .el-form-item{
margin-bottom: 0px !important;
}
</style>

@ -1,7 +1,9 @@
import 作业计划完成量统计 from "@/views/cxtj/作业计划完成量统计";
import 技术准备 from "@/views/cxtj/技术准备";
const methods={
'/scgl/jh/cxtj1':作业计划完成量统计()
'/scgl/jh/cxtj1':作业计划完成量统计(),
'/scgl/sc/cxtj_jszb':技术准备()
}
const init=(page)=>{
@ -9,4 +11,3 @@ const init=(page)=>{
}
export default init

@ -0,0 +1,293 @@
import request from '@/utils/request'
import XLSX from 'xlsx'
const 技术准备=()=>{
const list=()=>{
request({url:'/jszb/getFlowInfoList',method:'get',params:data.formData})
.then(res => {
console.log(res.data)
data.options.data=res.data
})
}
const importMethod=({file})=>{
const formBody = new FormData()
formBody.append('file', file)
return fetch(`${process.env.VUE_APP_BASE_API}jszb/importFLowInfo`, { method: 'POST', body: formBody })
.then(response => {
console.log(response)
}).then(data => {
console.log(data)
}).catch((e) => {
console.log(e)
VXETable.modal.message({ content: '导入失败,请检查数据是否正确!', status: 'error' })
})
}
//NCA,NCB,NCC,NCG,NCJ,NCL,NCP,NCT,SG2,SG3,XCX
const exportMethod=({options})=>{
const workBook = XLSX.utils.book_new();
const T型材Group=['SG2']
const {sheet:T型材重量sheet}=处理数据(T型材Group,(list)=>{
return list.map(item=>{
return {
船名:item.ch,
段号:item.fd,
零件号:item.partName,
材质:item.material,
规格:item.specification,
工序:item.type0,
:item.p,
:item.c,
:item.s,
重量:item,
数量:(item.p||0)+(item.c||0)+(item.s||0),
长度:item.xxSize,
宽度:item.yySize,
}
})
})
XLSX.utils.book_append_sheet(workBook, T型材重量sheet, "T型材重量");
const {sheet:T型材数量sheet}=处理数据(T型材Group,(list)=>{
const data={}
list.forEach(item=>{
const _data=data[item.pl+'_'+item.fd]
if (_data){
if (item.option3==='X'){
_data.小组数量++
_data.小组重量 += item.weight||0
}
if (item.option3!=='X'){
_data.大组数量++
_data.大组重量 += item.weight||0
}
}else{
_data.小组数量=0
_data.大组数量=0
_data.小组重量=0
_data.大组重量=0
}
})
return Object.keys(data).map(key=>{
const item=data[key]
const pl=key.split("_")[0]
const fd=key.split("_")[1]
return {
批量:pl,
分段:fd,
小组数量:item.小组数量,
小组:item.小组重量,
大组数量:item.大组数量,
大组:item.大组重量
}
})
})
XLSX.utils.book_append_sheet(workBook, T型材数量sheet, "T型材数量");
const {sheet:曲平铁sheet}=处理数据(['SG2','SG3','XCX'],(list)=>{
return list.map(item=>{
return {
船名:item.ch,
段号:item.fd,
批量:item.pl,
零件号:item.partName,
材质:item.material,
规格:item.specification,
工序:item.type0,
:item.p,
:item.c,
:item.s,
长度:item.xxSize,
宽度:item.yySize,
}
})
})
XLSX.utils.book_append_sheet(workBook, 曲平铁sheet, "曲平铁");
const {sheet:曲外板sheet}=处理数据(['NCA','NCB','NCC','NCG','NCJ','NCL','NCP','NCT'],(list)=>{
return list.map(item=>{
return {
船名:item.ch,
段号:item.fd,
批量:item.pl,
零件号:item.partName,
材质:item.material,
规格:item.specification,
工序:item.type0,
:item.p,
:item.c,
:item.s,
长度:item.xxSize,
宽度:item.yySize,
}
})
})
XLSX.utils.book_append_sheet(workBook, 曲外板sheet, "曲外板");
const {sheet:lastSheet}=处理数据(['NCA','NCB','NCC','NCG','NCJ','NCL','NCP','NCT'],(list)=>{
return list.map(item=>{
return {
船名:item.ch,
分段号:item.fd,
批量:item.pl,
零件名称:item.partName,
种类:item.type,
规格:item.specification,
数量:(item.p||0)+(item.c||0)+(item.s||0),
材质:item.material,
工序:item.type0,
特征:item.feature,
流向:item.flow,
下级:item.nextLevel,
套料图信息:item.nestingInfo,
}
})
})
XLSX.utils.book_append_sheet(workBook, lastSheet, "流向M、L组立大、中种类");
XLSX.writeFile(workBook, `${data.formData.ch}船技术准备.xlsx`)
}
const 处理数据=(groups,fun)=>{
const list=data.filter(item=>groups.includes(item.type0))
return {list:fun(list),sheet:XLSX.utils.json_to_sheet(_data)}
}
const data={
formData:{
ch:'',
begin:'',
end:'',
},
formItems:[
{ field: 'ch', title: '船号', span: 4,
itemRender: {
name: '$input', props: {placeholder: '船号' }
}
},
{ field: 'begin', title: '批次', span: 4 ,
itemRender: {
name: '$input', props: {placeholder: '起始批次' }
}
},
{ field: 'end', title: '批次', span: 4 ,
itemRender: {
name: '$input', props: {placeholder: '结束批次' }
}
},
{align:'right', span: 12 ,
itemRender: {
name: '$button', props: {content:'查询',status:'primary'},events:{click:list}
}
},
],
options:{
height:765,
align:'center',
border: true,
// resizable: true,
keepSource:true,
size:'mini',
showOverflow: true,
// scrollY:{enable:true,gt:10},
// scrollX:{enable:true,gt:10,scrollToLeftOnChange:true},
highlightCurrentRow:true,
data:[],
toolbarConfig: {
import: true,
export: true,
custom: true
},
importConfig: {
remote: true,
importMethod: importMethod,
types: ['xls','xlsx'],
modes: ['insert']
},
exportConfig: {
remote: true,
exportMethod: exportMethod,
types: ['xlsx'],
modes: ['current', 'selected', 'all']
},
},
columns:[
{ type: 'seq', width: 60, title: '序号' ,},
{ field: 'ch', title: '船号', width: 120 },
{ field: 'pl', title: '批量', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'fd', title: '分段号', width: 120 ,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'partName', title: '零件名称', width: 150,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'type', title: '种类', width: 100,
filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
filterRender: { name: 'FilterCombination', },
},
{ field: 'specification', title: '规格', width: 130 },
{ field: 'quantity', title: '数量', width: 100 },
{ field: 'material', title: '材质', width: 120 },
{ field: 'feature', title: '特征', width: 120 },
{ field: 'flow', title: '流向', width: 120 },
{ field: 'nextLevel', title: '下级', width: 120 },
{ field: 'nestingInfo', title: '套料图信息', width: 150 },
{ field: 'location', title: '场地', width: 120 },
{ field: 'project', title: 'PROJECT', width: 120 },
{ field: 'block', title: 'BLOCK', width: 120 },
{ field: 'partName0', title: 'PARTNAME', width: 120 },
{ field: 'partNo', title: 'PARTNO', width: 120 },
{ field: 'material0', title: 'MATERIAL', width: 120 },
{ field: 'thickness', title: 'THICK', width: 120 },
{ field: 'type0', title: 'TYPE', width: 120 },
{ field: 'p', title: 'P', width: 80 },
{ field: 'c', title: 'C', width: 80 },
{ field: 's', title: 'S', width: 80 },
{ field: 'np', title: 'NP', width: 80 },
{ field: 'nc', title: 'NC', width: 80 },
{ field: 'ns', title: 'NS', width: 80 },
{ field: 'area', title: 'AREA', width: 120 },
{ field: 'weight', title: 'WEIGHT', width: 120 },
{ field: 'cutLength', title: 'CUTLEN', width: 120 },
{ field: 'markLength', title: 'MARKLEN', width: 120 },
{ field: 'xxSize', title: 'X-SIZE', width: 120 },
{ field: 'yySize', title: 'Y-SIZE', width: 120 },
{ field: 'option', title: 'OPTION0', width: 120 },
{ field: 'm_part_name', title: 'MPARTNAME', width: 120 },
{ field: 's_part_name', title: 'SPARTNAME', width: 120 },
{ field: 'lot', title: 'LOT', width: 120 },
{ field: 'bbArea', title: 'BAREA', width: 120 },
{ field: 'ssAngle', title: 'SANGLE', width: 120 },
{ field: 'ssSizeX', title: 'SSIZE-X', width: 120 },
{ field: 'ssSizeY', title: 'SSIZE-Y', width: 120 },
{ field: 'goid', title: 'GOID', width: 120 },
{ field: 'date', title: 'DATE', width: 120 },
{ field: 'time', title: 'TIME', width: 120 },
{ field: 'shape', title: 'SHAPE', width: 120 },
{ field: 'assembly', title: 'ASSEMBLY', width: 120 },
{ field: 'option1', title: 'OPTION1', width: 120 },
{ field: 'option2', title: 'OPTION2', width: 120 },
{ field: 'option3', title: 'OPTION3', width: 120 },
{ field: 'option4', title: 'OPTION4', width: 120 },
{ field: 'option5', title: 'OPTION5', width: 120 },
{ field: 'direction', title: 'DIRECTION', width: 120 },
{ field: 'isModify', title: 'ISMODIFY', width: 120 },
{ field: 'nestName', title: 'NESTNAME', width: 120 }
],
}
return data
}
export default 技术准备

@ -779,6 +779,7 @@ export default {
{label:'二区',value:'FP2Q'},
{label:'三区',value:'FP3Q'},
{label:'四区',value:'FP4Q'},
{label:'六区',value:'FP6Q'},
],
tmpQuery:{dcCh:'',dcPl:''},
workers:{}

@ -5,7 +5,7 @@
<script>
import { VXETable } from 'vxe-table'
import paoWanPgdConfig from './pgdTable'
import {getDw, getForemanByWorker, getPgd, getPgd2, getYdjhByZtOrForeman, zx} from "@/api/zyjh";
import {getDw, getForemanByWorker, getYdjhByZtOrForeman, zx} from "@/api/zyjh";
import {EventBus} from "@/event-bus";
export default {

@ -68,7 +68,7 @@ export default function (width,height,zyq){
const getSelectSbbm=function (){
return selectSbbm
}
sbList[zyq].forEach((item,index)=>{
sbList[zyq]?.forEach((item,index)=>{
const sbGroup=new Konva.Group({
x: 5,
y: 5+index*_height/4-10,

@ -18,7 +18,6 @@ import drawPgd from './comps/pgd'
import drawSb from './comps/sb'
import baifang from "./comps/baifang";
import {getBzryByBz, getPgd, getYcldw} from "@/api/zyjh";
import {getBzryList} from "@/api/sjzx/bzzGL";
import HxianPgd from "@/views/zyjhzx/hxianfkui/comps/HxianPgd.vue";
import ZyjhSelectComp from "@/views/zyjhzx/components/SelectComp.vue";
import TipsComp from "@/views/zyjhzx/components/TipsComp.vue";

@ -79,7 +79,7 @@ export default function (width,height,zyq){
let selectedShape=null;
let selectSbbm=null;
const getSelectSbbm=function (){
return selectSbbm
return zyq==='六区'?'光电':selectSbbm
}
sbList[zyq]?.forEach((item,index)=>{
const sbGroup=new Konva.Group({

Loading…
Cancel
Save