From 2fdebc98069b03e5dca25c07cb1b768417b232c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=91=A3=E5=93=B2=E5=A5=87?= <13840175730@139.com>
Date: Tue, 13 May 2025 13:04:13 +0800
Subject: [PATCH] =?UTF-8?q?1.=E7=9C=8B=E6=9D=BF=202.=E6=8A=80=E6=9C=AF?=
=?UTF-8?q?=E5=87=86=E5=A4=87,=E5=AF=BC=E5=85=A5=E5=AF=BC=E5=87=BA=203.?=
=?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=8F=AD=E7=BB=84=E4=BA=BA=E5=91=98=E8=AE=BE?=
=?UTF-8?q?=E7=BD=AE/=E5=8F=96=E6=B6=88=E7=8F=AD=E9=95=BF=E6=97=B6,foreman?=
=?UTF-8?q?=E6=9C=AA=E6=AD=A3=E7=A1=AE=E8=B5=8B=E5=80=BC=E7=9A=84bug=204.?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=85=89=E7=94=B5=E6=8A=A5=E5=B7=A5=205.?=
=?UTF-8?q?=E4=B8=B4=E6=97=B6=E4=BC=98=E5=8C=96,=E5=88=92=E7=BA=BF,?=
=?UTF-8?q?=E5=88=87=E5=89=B2=E6=8A=A5=E5=B7=A5=E6=97=B6=E5=AD=98=E5=9C=A8?=
=?UTF-8?q?=E6=97=A0=E5=A5=97=E6=96=99=E5=9B=BE=E5=8F=B7=E7=9A=84=E4=BB=BB?=
=?UTF-8?q?=E5=8A=A1,=E5=AF=BC=E8=87=B4=E6=95=B0=E6=8D=AE=E4=B8=8D?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84=E6=83=85=E5=86=B5=E5=8F=91=E7=94=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/cxtj/JSZB.vue | 86 +++++
src/views/cxtj/index.js | 5 +-
src/views/cxtj/技术准备.js | 293 ++++++++++++++++++
src/views/jhzx/ydjhzxCX.vue | 1 +
src/views/zyjhzx/hxianfkui/comps/HxianPgd.vue | 2 +-
src/views/zyjhzx/hxianfkui/comps/sb.js | 2 +-
src/views/zyjhzx/hxianfkui/index.vue | 1 -
src/views/zyjhzx/qgefkui/comps/sb.js | 2 +-
8 files changed, 386 insertions(+), 6 deletions(-)
create mode 100644 src/views/cxtj/JSZB.vue
create mode 100644 src/views/cxtj/技术准备.js
diff --git a/src/views/cxtj/JSZB.vue b/src/views/cxtj/JSZB.vue
new file mode 100644
index 0000000..12335b5
--- /dev/null
+++ b/src/views/cxtj/JSZB.vue
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/cxtj/index.js b/src/views/cxtj/index.js
index e0422fe..ac3e721 100644
--- a/src/views/cxtj/index.js
+++ b/src/views/cxtj/index.js
@@ -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
-
diff --git a/src/views/cxtj/技术准备.js b/src/views/cxtj/技术准备.js
new file mode 100644
index 0000000..7a57eb0
--- /dev/null
+++ b/src/views/cxtj/技术准备.js
@@ -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 技术准备
diff --git a/src/views/jhzx/ydjhzxCX.vue b/src/views/jhzx/ydjhzxCX.vue
index 7deba6b..d41f8a8 100644
--- a/src/views/jhzx/ydjhzxCX.vue
+++ b/src/views/jhzx/ydjhzxCX.vue
@@ -779,6 +779,7 @@ export default {
{label:'二区',value:'FP2Q'},
{label:'三区',value:'FP3Q'},
{label:'四区',value:'FP4Q'},
+ {label:'六区',value:'FP6Q'},
],
tmpQuery:{dcCh:'',dcPl:''},
workers:{}
diff --git a/src/views/zyjhzx/hxianfkui/comps/HxianPgd.vue b/src/views/zyjhzx/hxianfkui/comps/HxianPgd.vue
index 7e255cf..4b2852c 100644
--- a/src/views/zyjhzx/hxianfkui/comps/HxianPgd.vue
+++ b/src/views/zyjhzx/hxianfkui/comps/HxianPgd.vue
@@ -5,7 +5,7 @@