From 4007178e3a5c5cd3855fad7cf84d5756b350399a 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, 7 Jul 2026 14:24:06 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E9=92=A2=E6=9D=90=E5=88=B0?= =?UTF-8?q?=E8=B4=A7=E6=83=85=E5=86=B5=E7=BB=9F=E8=AE=A1=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cxtj/index.js | 2 + src/views/cxtj/钢材到货情况统计.js | 120 +++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100644 src/views/cxtj/钢材到货情况统计.js diff --git a/src/views/cxtj/index.js b/src/views/cxtj/index.js index 4ed8e50..152cd99 100644 --- a/src/views/cxtj/index.js +++ b/src/views/cxtj/index.js @@ -2,6 +2,7 @@ import 作业计划完成量统计 from "@/views/cxtj/作业计划完成量统 import 技术准备 from "@/views/cxtj/技术准备"; import 看板对应数据 from "@/views/cxtj/看板对应数据表"; import 预切板统计 from "@/views/cxtj/yqbtj"; +import 钢材到货情况统计 from "@/views/cxtj/钢材到货情况统计" const methods={ '/scgl/jh/cxtj1':作业计划完成量统计(), @@ -13,6 +14,7 @@ const methods={ '/scgl/jh/cxtj_zkcl':看板对应数据('zhoucl'), '/scgl/jh/cxtj_ykcl':看板对应数据('yuecl'), '/scgl/jh/yqbtj':预切板统计(), + '/jcsj/cx/gcdhqktj':钢材到货情况统计(), } const init=(page)=>{ diff --git a/src/views/cxtj/钢材到货情况统计.js b/src/views/cxtj/钢材到货情况统计.js new file mode 100644 index 0000000..a1a73d6 --- /dev/null +++ b/src/views/cxtj/钢材到货情况统计.js @@ -0,0 +1,120 @@ +import request from '@/utils/request' +import {getSumAdd} from "@/utils/rpkj"; + +const 钢材到货情况统计=()=>{ + const butClick=()=>{ + 钢材到货情况统计查询(data.formData).then(res=>{ + res.data.map(item=>{ + const data={ + ...item + } + const 到货比例=item.completeTon/item.planTon + data.到货比例=(到货比例*100).toFixed(0)+'%' + data.差距=(item.planTon-item.completeTon).toFixed(2) + }) + data.options.data=res.data + }) + } + + const countGroup=[] + countGroup.push('planTon','completeTom') + + const footerMethod=({ columns, data })=>{ + return [ + columns.map((column, columnIndex) => { + if (countGroup.includes(column.property)) { + return getSumAdd(data, column.property) + } + if (columnIndex === 1) { + return '合计' + } + return null + }) + ] + } + + const data={ + formData:{ + dcCh:'', + dcPl:'', + }, + formItems:[ + { field: 'dcCh', title: '船号', span: 4, + itemRender: { + name: '$select', props: { options:[],placeholder: '船号' } + } + }, + { field: 'dcPl', title: '批量', span: 4, + itemRender: { + name: 'input', props: { options:[],placeholder: '批量' } + } + }, + {span: 20 ,align:'right', + itemRender: { + name: '$button', props: {content:'查询',status:'primary'},events:{click:butClick} + } + }, + ], + options:{ + height:400, + align:'center', + border: true, + resizable: true, + keepSource:true, + size:'mini', + showOverflow: true, + scrollY:{enable:true}, + editConfig:{trigger: 'click', mode: 'cell', showStatus: true}, + highlightCurrentRow:true, + showFooter:true, + footerMethod:footerMethod, + data:[], + }, + columns:[ + { field: 'dcCh', title: '产品', + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, + }, + { field: 'plZ', title: '所含批量', + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, + }, + { field: 'planTon', title: '订货吨位', + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, + }, + { field: 'completeTon', title: '到货吨位', + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, + }, + { field: '到货比例', title: '到货比例', + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, + }, + { field: '使用月份', title: '使用月份', + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, + }, + { field: 'planDate', title: '计划到货期', + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, + }, + { field: '差距', title: '差距/吨', + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, + }, + ] + } + + return data +} + +const 钢材到货情况统计查询=(data)=>{ + return request({ + url: "/钢材到货情况统计/list", + method: "get", + data, + }); +} + +export default 钢材到货情况统计