From ae821146209f4d49ffbb41d12cbbc514894be5a1 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, 24 Jun 2025 11:16:58 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=9D=90=E8=B4=A8=E8=AF=81=E4=BB=B6=E8=B7=9F?= =?UTF-8?q?=E8=B8=AA=E5=A2=9E=E5=8A=A0=E4=BF=AE=E6=AD=A3=E5=8A=9F=E8=83=BD?= =?UTF-8?q?,=E9=98=B2=E6=AD=A2=E6=9C=AA=E5=AF=BC=E5=85=A5=E9=9B=B6?= =?UTF-8?q?=E4=BB=B6=E9=85=8D=E5=A5=97=E8=A1=A8=E6=97=B6=E6=8A=A5=E5=B7=A5?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=9D=90=E8=B4=A8=E8=AF=81=E4=BB=B6=E7=BC=BA?= =?UTF-8?q?=E5=A4=B1=E9=97=AE=E9=A2=98=202.=E8=B0=83=E6=95=B4=E5=88=87?= =?UTF-8?q?=E5=89=B2=E6=8A=A5=E5=B7=A5=E9=9B=B6=E4=BB=B6=E7=94=9F=E6=88=90?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=85=BC=E5=AE=B9=E5=90=8E=E7=BB=AD=E9=9B=B6?= =?UTF-8?q?=E4=BB=B6=E4=BD=9C=E4=B8=9A=E6=8A=A5=E5=B7=A5=E7=8A=B6=E6=80=81?= =?UTF-8?q?,=E9=98=B2=E6=AD=A2=E7=9B=B4=E6=8E=A5=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=8A=A5=E5=B7=A5=E4=BF=A1=E6=81=AF=E4=B8=A2?= =?UTF-8?q?=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/jhzx/ylxx.js | 2 ++ src/views/zl/czzjgz.vue | 76 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 74 insertions(+), 4 deletions(-) diff --git a/src/api/jhzx/ylxx.js b/src/api/jhzx/ylxx.js index 2bd9430..bd43623 100644 --- a/src/api/jhzx/ylxx.js +++ b/src/api/jhzx/ylxx.js @@ -3,3 +3,5 @@ import request from '@/utils/request' export function getYlList(data) {return request({url: '/mpYlxxp/getYlList', method: 'post', data})} export function czzjList(data) {return request({url: '/mpYlxxp/czzjList', method: 'post', data})} +//手动生成材质证件 +export function sdtbczzj(data) {return request({url: '/zyjh/sdtbczzj', method: 'post', data})} diff --git a/src/views/zl/czzjgz.vue b/src/views/zl/czzjgz.vue index f804af4..dcaefd5 100644 --- a/src/views/zl/czzjgz.vue +++ b/src/views/zl/czzjgz.vue @@ -61,6 +61,7 @@ 查询 导出 + 重新生成 @@ -119,6 +120,9 @@ + + + @@ -127,7 +131,7 @@ import { getPgdBase, } from '@/api/jhzxgl/pgd' import { - getYlList,czzjList + getYlList, czzjList, sdtbczzj } from '@/api/jhzx/ylxx' import { mapGetters } from 'vuex' import XEUtils from 'xe-utils' @@ -141,6 +145,24 @@ export default { name:'Czzjgz', data() { return { + formOptions:{ + formData:{ + dcCh:'', + dcPl:'', + tzbh:'' + }, + formItems:[ + {field: 'dcCh', title: '船号', span: 24, itemRender: { name: '$input', props: { placeholder: '请输入船号' } }}, + {field: 'dcPl', title: '批量', span: 24, itemRender: { name: '$input', props: { placeholder: '请输入批量' } }}, + {field: 'tzbh', title: '图号', span: 24, itemRender: { name: '$input', props: { placeholder: '请输入图号' } }}, + {align:'right',span:20, + itemRender: {name: '$button', props: {content:'保存',status:'primary'},events:{click:this.submitEvent}} + }, + {align:'right',span:4, + itemRender: {name: '$button', props: {content:'取消'},events:{click:this.closeModal}} + }, + ], + }, queryParam: { dcch:'', dcpl1:'', @@ -313,7 +335,8 @@ export default { filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filterRender: { name: 'FilterCombination' } }, - ] + ], + modalShow:false, } }, computed: { @@ -323,10 +346,55 @@ export default { window.addEventListener('resize', this.getHeight) this.getHeight() this.initBase() - - }, methods: { + //按船号、批次、图号重新生成材质证件,用于解决材质证件数据不完整的问题 + recovery(){ + const selectData=this.$refs.xGrid.getCheckboxRecords() + const tmp=[],data=[] + for (const item of selectData) { + const key=`${item.DC_CH}_${item.DC_PL}_${item.DC_TH}` + if (tmp.includes(key)){ + continue + } + tmp.push(key) + data.push({ + dcCh:item.DC_CH, + dcPl:item.DC_PL, + tzbh:item.DC_TH, + }) + } + + if (data.length>0){ + sdtbczzj(data).then(res=>{ + this.initList() + }) + }else{ + //手动生成 + this.modalShow=true + } + }, + submitEvent(){ + const data=this.formOptions.formData + if (!data.dcCh){ + this.$message.warning('请填写船号') + return + } + if (!data.dcPl){ + this.$message.warning('请填写批次') + return + } + if (!data.tzbh){ + this.$message.warning('请填写图号') + return + } + sdtbczzj([data]).then(res=>{ + this.initList() + }) + }, + closeModal(){ + this.modalShow=false + }, exportXls(){ const data=this.$refs.xGrid.getCheckboxRecords() if (data.length===0){