From 63f587387d3410911da6de9de56cd3f6c641bfbf Mon Sep 17 00:00:00 2001 From: xhj Date: Fri, 25 Oct 2024 08:50:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/jhzxgl/pgd.js | 2 + src/views/jhzxgl/sljhD.vue | 311 ++++++++++++++++++++++--------------- 2 files changed, 188 insertions(+), 125 deletions(-) diff --git a/src/api/jhzxgl/pgd.js b/src/api/jhzxgl/pgd.js index 4cc16ba..239fa4f 100644 --- a/src/api/jhzxgl/pgd.js +++ b/src/api/jhzxgl/pgd.js @@ -28,6 +28,8 @@ export function slPrint(data) {return request({url: '/pgdSljh/slPrint', method: export function getKcAndSljh(data) {return request({url: '/pgdSljh/getKcAndSljh', method: 'post', data})} export function getKcAndSljh1(data) {return request({url: '/pgdSljh/getKcAndSljh1', method: 'post', data})} export function kcAdnSlBd(data) {return request({url: '/pgdSljh/kcAdnSlBd', method: 'post', data})} +export function kcAdnSlBd1(data) {return request({url: '/pgdSljh/kcAdnSlBd1', method: 'post', data})} +export function kcAdnSlBd2(data) {return request({url: '/pgdSljh/kcAdnSlBd2', method: 'post', data})} export function kcAdnSlZx(data) {return request({url: '/pgdSljh/kcAdnSlZx', method: 'post', data})} export function saveSljhPgdXd(data) {return request({url: '/pgdSljh/saveSljhPgdXd', method: 'post', data})} export function saveSljhPgdXdBack(data) {return request({url: '/pgdSljh/saveSljhPgdXdBack', method: 'post', data})} diff --git a/src/views/jhzxgl/sljhD.vue b/src/views/jhzxgl/sljhD.vue index 79a1639..7459f82 100644 --- a/src/views/jhzxgl/sljhD.vue +++ b/src/views/jhzxgl/sljhD.vue @@ -74,66 +74,72 @@ - 查询 - - - - - - - - - - - - - - - - - - - - - - - - - - 查询 + + 查询 + 核对 + + 保存 + 打印 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -213,31 +219,30 @@ > + + + 批量 - + - - - - - + + + + + + + + + + - - 批量 - 核对 - - 保存 - 打印 + + @@ -246,7 +251,7 @@ -
+
-
- - - - - - - - -
+ + + + + + + + + + + + + + + + + + + + + + + + + + @@ -319,7 +324,17 @@ import { saveSljhPgdXd, saveSljhPgdXdBack, saveSljhFk, - getPgdBase, saveSljhPg, saveSljhPgBack, getKcAndSljh, kcAdnSlBd, kcAdnSlZx, getydjhByid, getKcAndSljh1, slPrint + getPgdBase, + saveSljhPg, + saveSljhPgBack, + getKcAndSljh, + kcAdnSlBd, + kcAdnSlZx, + getydjhByid, + getKcAndSljh1, + slPrint, + kcAdnSlBd1, + kcAdnSlBd2 } from '@/api/jhzxgl/pgd' import { mapGetters } from 'vuex' import XEUtils from 'xe-utils' @@ -636,8 +651,8 @@ export default { { title: '套料图号', width: "120px", - field: 'dcTh', - + field: 'dcth', + editRender: { name: 'input' }, filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filterRender: { name: 'FilterCombination' }, }, @@ -1057,29 +1072,75 @@ export default { return } // this.bdbs='01' 核对 标识 等于 01 不能继续核对 - if(this.inParam.dcch !==''){ - this.queryParam.dcch=this.inParam.dcch + if(this.inParam.dcch ===''){ + this.$message({ message: '请输入需求船号', type: 'warning' }) + return } - this.initList().then(res=>{ - if(this.inParam.pl !=='') { - this.queryParam.xqpl = this.inParam.pl - } - if(this.inParam.dcch !==''){ - this.queryParam.xqdcch=this.inParam.dcch - this.getlist1().then(res=>{ - this.hd() - }) - - }else{ - this.hd() - } - // if(this.bdbs=='01'){ - // this.$message({ message: '核对结果未保存,重新查询后进行核对', type: 'warning' }) - // return - // } - console.log(this.$refs.xGrid.getTableData()) + if(this.inParam.dcpl ===''){ + this.$message({ message: '请输入需求批量', type: 'warning' }) + return + } + let obj =this.$refs.xGrid.getTableData().visibleData; + if(obj.length<=0){ + this.$message({ message: '页面无数据', type: 'warning' }) + } + kcAdnSlBd2({ + "data1":this.$refs.xGrid.getTableData().visibleData, + "dcch":this.inParam.dcch, + "dcpl":this.inParam.dcpl, + }).then(res=>{ + if(res.success){ + let array1 = this.$refs.xGrid.getTableData().visibleData + let array2=res.data.slkcs + console.log(array1) + console.log(array2) + array1.forEach(item1 => { + this.$refs.xGrid.setCheckboxRow(item1,false) + + array2.forEach(item2 => { + if (item1.ckh === item2.ckh && item1.wph === item2.wph && item1.kwh === item2.kwh && item1.nbsbm === item2.nbsbm) { + //console.log(`Match found: ${item1.name} and ${item2.name}`); + //console.log(item1.nbsbm); + console.log(item2); + item1.zych = item2.dcch + item1.zypl = item2.zypl + item1.zylx =item2.zylx + item1.sldw = item2.sldw + item1.ydid = item2.ydid + item1.dhh = item2.dhh + item1.dcth = item2.dcth + + // item1.dhh = item2.sljhrq + + this.$refs.xGrid.setCheckboxRow(item1,true) + return + + } + }); + }); + } }) + // this.initList().then(res=>{ + // if(this.inParam.pl !=='') { + // this.queryParam.xqpl = this.inParam.pl + // } + // if(this.inParam.dcch !==''){ + // this.queryParam.xqdcch=this.inParam.dcch + // this.getlist1().then(res=>{ + // this.hd() + // }) + // + // }else{ + // this.hd() + // } + // + // // if(this.bdbs=='01'){ + // // this.$message({ message: '核对结果未保存,重新查询后进行核对', type: 'warning' }) + // // return + // // } + // console.log(this.$refs.xGrid.getTableData()) + // }) }, @@ -1160,15 +1221,15 @@ export default { } - kcAdnSlZx({ + kcAdnSlBd1( // "data1":this.$refs.xGrid.getTableData().visibleData, // "data2":this.$refs.xGrid1.getTableData().visibleData - "data1":this.$refs.xGrid.getUpdateRecords(), - "data2":this.$refs.xGrid1.getUpdateRecords() - }).then((res) => { + this.$refs.xGrid.getUpdateRecords(), + + ).then((res) => { // if(res.success){ this.initList() - this.initList1() + //} })