From 3bee61d7f23e17f8d802ae67c390ce6088c08059 Mon Sep 17 00:00:00 2001 From: xiaoning <1097449274@qq.com> Date: Wed, 26 Mar 2025 15:07:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=88=E5=BA=A6=E8=AE=A1=E5=88=92=E8=BF=BD?= =?UTF-8?q?=E8=B8=AA=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/sjzx/jcsj.js | 7 + src/views/sjzx/ydjhzzCX.vue | 444 ++++++++++++++++++++++++++++++++++++ 2 files changed, 451 insertions(+) create mode 100644 src/views/sjzx/ydjhzzCX.vue diff --git a/src/api/sjzx/jcsj.js b/src/api/sjzx/jcsj.js index c3fef6a..0b3da51 100644 --- a/src/api/sjzx/jcsj.js +++ b/src/api/sjzx/jcsj.js @@ -57,3 +57,10 @@ export function getBcTJlList(data) {return request({url: '/dmBchxylp/getBcTJlLis export function getTLTList(data) {return request({url: '/dmBchxmxp/getTLTList', method: 'post', data})} export function getLJQDList(data) {return request({url: '/dmWlqd/getLJQDList', method: 'post', data})} +export function getYdjhzzList(ch) { + return request({ + url: "/ydjhzz/getList", + method: "post", + params:{ch}, + }); +} diff --git a/src/views/sjzx/ydjhzzCX.vue b/src/views/sjzx/ydjhzzCX.vue new file mode 100644 index 0000000..f7a175c --- /dev/null +++ b/src/views/sjzx/ydjhzzCX.vue @@ -0,0 +1,444 @@ +<template> + <el-container> + <el-header style="width: 100%; height: 60px;font-size: 12px"> + <el-form :inline="true" label-width="65px" label-position="left"> + <el-row> + <el-col :span="20"> + + <el-form-item label="船号:"> + <vxe-pulldown ref="xDown4" transfer > + <template #default> + <vxe-input + v-model="queryParam.dcch" + placeholder="船号" + style="height: 28px; + line-height: 28px; width: 150px;" + suffix-icon="vxe-icon--search" + @keyup="keyupEvent4" + @focus="focusEvent4" + /> + </template> + <template #dropdown> + <div class="my-dropdown mytable " style="width: 250px"> + <vxe-grid + highlight-hover-row + height="auto" + + :data="projectData" + :columns="projectColumns" + @cell-click="cellClickEvent" + show-overflow + > + <template #wgbsEdit="{ row}"> + <vxe-checkbox v-model="row.wgbs" checked-value="Y" unchecked-value="N" disabled ></vxe-checkbox> + </template> + </vxe-grid> + </div> + </template> + </vxe-pulldown> + + </el-form-item> + </el-col> + <el-col :span="4"> + <el-form-item style="float: right" > + <el-button type="success" @click="initList">查询</el-button> + <el-button + class="out-item" + type="primary" + icon="el-icon-download" + @click="handleExport" + >导出Excel</el-button> + </el-form-item> + </el-col> + </el-row> + </el-form> + </el-header> + <el-container style="padding-top: 0px"> + <el-container> + <el-main> + <div class="mytable"> + <vxe-grid + id="id" + ref="xGrid" + border + resizable + :scroll-y="{enabled: true}" + :align="'center'" + :height="height" + :columns="tableColumn" + highlight-current-row + :data="list" + :custom-config="{ storage: true }" + highlight-hover-row + show-overflow + show-header-overflow + > + <template #hjdwDefault="{ row }"> + <span>{{ hdwNum(row) }}</span> + </template> + </vxe-grid> + </div> + </el-main> + </el-container> + </el-container> + </el-container> +</template> + +<script> +import { + getYdjhzzList,getCzplBase +} from '@/api/sjzx/jcsj' +import { mapGetters } from 'vuex' +import XEUtils from 'xe-utils' +import { getToken } from '@/utils/auth' +export default { + name:'YdjhzzCX', + data() { + return { + queryParam: { + dcch:'', + }, + list: [], + heads: { token: getToken() }, + dictData:{}, + height: '500px', + projectData:[], + projectData1:[], + projectColumns: [ + {field: 'cbbm', title: '船号',width: 110}, + { field: 'wgbs', title: '完工标识', width: 80, + slots:{ + default: 'wgbsEdit' + }, + }, + ], + tableColumn: [ + + { type: 'seq', width: 60, title: '序号',fixed:"left" }, + {field: 'dcCh', title: '船号', width: 100,fixed:"left", + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'dcPl', title: '批量', width: 100,fixed:"left", + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'dcFd', title: '分段', width: 100,fixed:"left", + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'lm1', title: '龙门1', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'lmdw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 's1', title: '数1', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 's1dw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'sx2', title: '数小2', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'sx2dw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'szd2', title: '数中大2', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'szd2dw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'xf', title: '小腹', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'xfdw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'df', title: '大腹', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'dfdw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'xzhb', title: '小组厚板', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'xzhbdw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'dzhb', title: '大组厚板', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'dzhbdw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'sx4', title: '数小4', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'sx4dw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'jz4', title: '机肘4', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'jz4dw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'xm', title: '小面', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'xmdw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'dm', title: '大面', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'dmdw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'sx3', title: '手小3', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'sx3dw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'sj3', title: '手机3', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'sj3dw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'szd3', title: '手中大3', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'szd3dw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'xzxc', title: '小组型材', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'xzds', title: '小组吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'xzgs', title: '小组根数', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'dzxc', title: '大组型材', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'dzds', title: '大组吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'dzgs', title: '大组根数', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'fg', title: '方钢', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'fgdw', title: '方钢吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: '', title: '型材根数合计', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: '', title: '型材总米数(不含方钢)', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'xchdw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'hdw', title: '合吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'szd4', title: '数中大4', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'szd4dw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'sq2x', title: '数曲2小', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'sq2xdw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'sq2d', title: '数曲2大', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'sq2ddw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'xq3', title: '小曲3', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'xq3dw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'dq3', title: '大曲3', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'dq3dw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'gd', title: '光电', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'gdDw', title: '吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'hdw1', title: '合吨位', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'hjdw', title: '合计吨位', width: 100,slots: { default: 'hjdwDefault' }, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'hjbs', title: '板数合计', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'xflj', title: '小腹零件', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + {field: 'dflj', title: '大腹零件', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, }, + + ] + } + }, + computed: { + ...mapGetters(['name', 'bmbm']) + }, + created() { + window.addEventListener('resize', this.getHeight) + this.getHeight() + this.initBase() + }, + methods: { + handleExport() { + this.$refs.xGrid.exportData({ + filename: '月度计划追踪记录',// 文件名字 + sheetName: 'Sheet1', + type: 'xlsx',//导出文件类型 xlsx 和 csv + data: this.data, // 数据源 + // sheetMethod: this.sheetMethod, + // useStyle: true, + // 过滤那个字段导出 + columnFilterMethod: function(column, $columnIndex) { + return !(column.$columnIndex === 0 ) + // 0是复选框 不导出 + } + }) + }, + hdwNum(row){ + var n=(row.hdw+row.hdw1).toFixed(1); + + return n; + }, + initList() { + if (this.queryParam.dcch === '') { + this.$message.warning('选择船只编号') + return + } + getYdjhzzList(this.queryParam.dcch).then((res) => { + this.list = res.data + }) + }, + initBase(){ + getCzplBase({}).then(res=>{ + this.dictData = res.data + this.projectData=res.data.cbbm + this.projectData1=res.data.cbbm + + }) + }, + cellClickEvent({row}) { + this.queryParam.dcch = row.cbbm + this.$refs.xDown4.hidePanel() + }, + focusEvent4() { + this.$refs.xDown4.showPanel() + }, + keyupEvent4() { + if (this.queryParam.dcch) { + this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.queryParam.dcch.toUpperCase()) > -1) + } else { + this.projectData = this.projectData1.slice(0) + } + + }, + formatDate ({ cellValue }) { + return XEUtils.toDateString(cellValue, 'yyyy/MM/dd') + }, + getHeight() { + this.height = window.innerHeight - 160 + }, + } +} +</script> +<style lang="scss" scoped > + +.el-header{margin:0;padding: 5px;height:auto; + .el-input{ + width: 140px; + } + .el-select{ + width: 140px; + } + +} +.el-container{padding: 0;margin:0;} +.el-main{padding: 0;} +.el-col{padding: 0;height: 32px;} +.el-aside{background: #fff;padding: 0} +.el-container{padding: 0} +.el-row {} +.el-row:last-child {margin-bottom: 0; } + +.tableStyles{ + background: #0a76a4; +} + +.my-dropdown { + width: 400px; + height: 400px; + background-color: #fff; + border: 1px solid #dcdfe6; + box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1); + font-size: 12px; + +} +.mytable1{ + +} +.borderClass{ + +} +.vxe-input { + display: inline-block !important; + position: relative !important; + width: auto; +} +.el-input { + display: inline-block !important; + position: relative !important; + width: auto; +} +.keyword-lighten { + color: #000; + background-color: #FFFF00; +} + +.vxe-textarea--inner { + line-height: inherit; +} +.el-form-item__label-wrap { + margin-left: 0px !important; + float: left; +} +.fontClass{ + font-size: 12px; + font-weight: bold; +} + + +</style>