From 7b183b7e4eb10c52b205618730d5ef71df66ffc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=93=B2=E5=A5=87?= <13840175730@139.com> Date: Thu, 9 Jan 2025 21:18:33 +0800 Subject: [PATCH] =?UTF-8?q?1.=E6=8C=89=E6=9C=88=E5=BA=A6=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=9F=A5=E8=AF=A2=E6=9C=88=E5=BA=A6=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E5=AF=BC=E5=85=A5=E5=86=85=E5=AE=B9,=E6=9C=88?= =?UTF-8?q?=E5=BA=A6=E8=AE=A1=E5=88=92=E6=8C=89=E5=AF=BC=E5=85=A5excel?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=202.=E6=9C=88=E5=BA=A6=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E6=97=B6=E6=8C=89=E7=85=A7=E5=9F=BA=E7=A1=80?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=AE=A1=E7=AE=97=E5=90=84=E5=B7=A5=E5=BA=8F?= =?UTF-8?q?=E5=AE=9E=E9=99=85=E6=95=B0=E9=87=8F=203.=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E6=9C=88=E5=BA=A6=E8=AE=A1=E5=88=92=E5=AF=BC=E5=85=A5=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=204.=E7=9C=8B=E6=9D=BF=E5=A2=9E=E5=8A=A0=E7=BB=84?= =?UTF-8?q?=E7=AB=8B=E6=B5=81=E5=90=91=205.=E6=89=B9=E9=87=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=BD=9C=E4=B8=9A=E5=8C=BA=206.=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E7=BA=BF=E8=A1=A8=E8=AE=A1=E5=88=92,=E5=8F=96=E6=B6=88?= =?UTF-8?q?=E5=B7=B2=E5=AE=8C=E5=B7=A5=E8=88=B9=E5=8F=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/jhzx/sygd.js | 5 + src/views/jhzx/symxCX.vue | 104 +++++++++---------- src/views/jhzx/xbjhWH.vue | 47 ++++++--- src/views/jhzx/ydjhzxGL.vue | 16 ++- src/views/zyjhzx/hxianfkui/comps/pgdTable.js | 15 ++- src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue | 42 +++++++- src/views/zyjhzx/qgefkui/comps/pgdTable.js | 15 ++- 7 files changed, 165 insertions(+), 79 deletions(-) diff --git a/src/api/jhzx/sygd.js b/src/api/jhzx/sygd.js index a5318ab..09d910c 100644 --- a/src/api/jhzx/sygd.js +++ b/src/api/jhzx/sygd.js @@ -24,3 +24,8 @@ export function ydjhxf(data) {return request({url: '/dmYdjh/xf', method: 'post', export function cgjhdhqk(data={}) {return request({url: '/dmSygdMx/cgjhdhqk', method: 'post',data})} export function saveData(data={}) {return request({url: '/dmYdjh/save', method: 'post',data})} + +//获取导入的月度计划文件名称 +export function getFilename() {return request({url: '/dmSygdMx/getFileNameList', method: 'get',})} + +export function listByFileName(data) {return request({url: '/dmSygdMx/listByFileName', method: 'get', params:data})} diff --git a/src/views/jhzx/symxCX.vue b/src/views/jhzx/symxCX.vue index 714a927..4db690b 100644 --- a/src/views/jhzx/symxCX.vue +++ b/src/views/jhzx/symxCX.vue @@ -4,13 +4,21 @@ - - 小组需求时间范围: - - - - - + + + + + + + + + + + @@ -91,36 +99,14 @@ :data="list" :custom-config="{ storage: true }" :scroll-y="{enabled: true}" + :scroll-x="{enabled: true}" highlight-hover-row show-overflow show-header-overflow + > + - - - - - - - - - - - - - - - - - - - - - - - - - @@ -172,7 +158,6 @@ show-overflow :scroll-y="{enabled: true}" > - @@ -215,7 +200,6 @@ highlight-current-row :data="list3" :custom-config="{ storage: true }" - :scroll-y="{enabled: true}" highlight-hover-row show-overflow @@ -361,7 +345,7 @@ import { sygdPC, saveByDcch, tqSygd, - symxhz, + symxhz, getFilename, listByFileName, } from '@/api/jhzx/sygd' import {mapGetters} from 'vuex' import XEUtils from 'xe-utils' @@ -395,9 +379,11 @@ export default { haveTltBoms: [], activeName: 'first', queryParam: { + fileName:'', beginTime: '', endTime: '' }, + fileNameList:[], list: [], list1: [], list2: [], @@ -1216,7 +1202,7 @@ export default { }, ],*/ tableColumn:[ - { type: 'seq', width: 60, title: '序号',fixed: "left"}, + { field: '_index', width: 60, title: '序号',fixed: "left"}, { field: 'dcCh', title: '船号',width: 100, filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filterRender: { name: 'FilterCombination', }}, @@ -2832,6 +2818,9 @@ export default { } }, methods: { + fileNameChange(){ + + }, next() { if (this.active++ > 2) this.active = 0; }, @@ -2846,7 +2835,6 @@ export default { }, //异常数据颜色 rowStyle1({row, rowIndex}){ - console.log(row.extData!=='1') if (row.extData!=='1'){ return { backgroundColor: '#FF0000FF', @@ -2877,11 +2865,6 @@ export default { // if (field === 'dlzh' || field === 'employeeNumber') { // if (type === 'body') { - // console.log('type',type) - // console.log('column',column) - // console.log('row',row.zt) - // console.log('items',items) - // console.log('_columnIndex',_columnIndex) // return column.title ? '自定义标题提示内容:' + column.title : '' // } // else if (type === 'footer') { @@ -2909,7 +2892,6 @@ export default { } symxhz(this.queryParam).then((res) => { if (res.data) { - console.log(res.data) this.list1 = res.data.xbList this.list2 = res.data.plList this.list3 = res.data.kwList @@ -3076,6 +3058,9 @@ export default { }, //转码信息 initBase() { + getFilename().then(res=>{ + this.fileNameList=res.data + }) getCzxx({}).then(res => { this.dictData = res.data }) @@ -3083,15 +3068,23 @@ export default { }, //初始化表1 数据 initList() { - if (this.queryParam.beginTime === '' || this.queryParam.endTime === '') { - this.$message.warning('选择时间范围') - return - } - const data={ - begin:this.queryParam.beginTime, - end:this.queryParam.endTime - } - list(data).then((res) => { + // if (this.queryParam.beginTime === '' || this.queryParam.endTime === '') { + // this.$message.warning('选择时间范围') + // return + // } + // const data={ + // begin:this.queryParam.beginTime, + // end:this.queryParam.endTime + // } + listByFileName({fileName:this.queryParam.fileName}).then((res) => { + const data=res.data + let i=1 + data.forEach((item,index)=>{ + if(index%2!==1){ + item._index=i + i++ + } + }) this.list = res.data }) this.activeName = 'first' @@ -3207,7 +3200,6 @@ export default { // this.uploadData.isupload = this.isupload }, beforeAvatarUpload(file) { - // 文件类型 const isType = file.type === 'application/vnd.ms-excel' const isTypeComputer = file.type === 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' @@ -3223,10 +3215,12 @@ export default { handleAvatarSuccess(res, file) { endLoading() if (res.success) { - this.$message({ message: '导入成功', type: 'success' }) + this.queryParam.fileName=res.data + if (!this.fileNameList.includes(res.data)){ + this.fileNameList.push(res.data) + } this.initList(); - } else { Message({ message: res.message || 'Error', diff --git a/src/views/jhzx/xbjhWH.vue b/src/views/jhzx/xbjhWH.vue index 8233ccd..8c276da 100644 --- a/src/views/jhzx/xbjhWH.vue +++ b/src/views/jhzx/xbjhWH.vue @@ -46,6 +46,7 @@ type="year" value-format="yyyy" placeholder="" + @change="nrStartChange" >
~
@@ -61,7 +62,7 @@
- + { this.versions=res.data - console.log(this.versions) this.version=res.data[res.data.length-1].version + this.initList(); //获取数据 }) }, getNowTime(){ @@ -407,20 +415,25 @@ export default { } else { this.request.nf = ""; } - // if() params.version=this.version; - getList(params).then((res) => { - if (res.success) { - this.checkedList = {}; - this.getTableList(res.data); - } - }); - if (this.version!==this.versions[this.versions.length-1]){ - getByVersion({nf:this.nrStart,version:this.version}).then((res) => { - console.log(res) - }) - } - this.getV() + getList(params).then((res) => { + if (res.success) { + this.checkedList = {}; + this.getTableList(res.data); + } + }); + // if (this.version){ + // getByVersion({nf:this.nrStart,version:this.version}).then((res) => { + // this.getTableList(res.data); + // }) + // }else{ + // getList(params).then((res) => { + // if (res.success) { + // this.checkedList = {}; + // this.getTableList(res.data); + // } + // }); + // } }, // 表尾列求和 total(list, field) { diff --git a/src/views/jhzx/ydjhzxGL.vue b/src/views/jhzx/ydjhzxGL.vue index ddd3153..721b317 100644 --- a/src/views/jhzx/ydjhzxGL.vue +++ b/src/views/jhzx/ydjhzxGL.vue @@ -30,7 +30,7 @@
- + @@ -43,6 +43,16 @@ + + + + + + 批量录入 @@ -108,12 +118,13 @@ export default { pwjhrq:null, hxjhrq:null, qgjhrq:null, + zyq:'', }, bgControl:'1', queryParam: { dcch:'', yf:'', - zt: '0' + zt: '11' }, zyqList:[ {label:'二区',value:'FP2Q'}, @@ -778,6 +789,7 @@ export default { item.pwjhrq=this.plParam.pwjhrq||item.pwjhrq item.hxjhrq=this.plParam.hxjhrq||item.hxjhrq item.qgjhrq=this.plParam.qgjhrq||item.qgjhrq + item.zyq=this.plParam.zyq||item.zyq } }, formatterZt({cellValue}){ diff --git a/src/views/zyjhzx/hxianfkui/comps/pgdTable.js b/src/views/zyjhzx/hxianfkui/comps/pgdTable.js index 81ca16d..254b8a9 100644 --- a/src/views/zyjhzx/hxianfkui/comps/pgdTable.js +++ b/src/views/zyjhzx/hxianfkui/comps/pgdTable.js @@ -59,6 +59,15 @@ export default function () { return '' } + const formatKw=function ({cellValue}){ + for (const item of this.ycldw) { + if (cellValue===item.bm){ + return item.bmsm + } + } + return cellValue; + } + const columns = [ { type: 'checkbox', width: 40 }, { type: 'seq',title:'序号', width: 50 }, @@ -77,7 +86,11 @@ export default function () { {field: 'wpgg', title: '材质', width: 80}, {field: 'wpxh', title: '规格', width: 70}, {field: 'sllph', title: '炉批号', width: 100}, - {field: '_lx', title: '流向', width: 80,formatter:formatLx, + {field: 'zl', title: '组立', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, + }, + {field: 'kw', title: '流向', width: 80,formatter:formatKw, filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filterRender: { name: 'FilterCombination', }, }, diff --git a/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue b/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue index 846c331..1d8e31a 100644 --- a/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue +++ b/src/views/zyjhzx/pwanfkui/comps/PwanPgd.vue @@ -42,7 +42,6 @@ export default { }, sockets:{ pwComplete(data){ - console.log(data) const selected=this.$refs.pwfkRef.getCheckboxRecords(); for (const item of selected) { if (item.dcCh===data.czbh&&item.dcPl===data.pl&&item.tzbh===data.tlth){ @@ -51,6 +50,15 @@ export default { } } }, + pwComplete1(data){ + const selected=this.$refs.pwfkRef.getCheckboxRecords(); + for (const item of selected) { + if (item.dcCh===data.dcCh&&item.dcPl===data.dcPl&&item.tzbh===data.tzbh){ + this.$refs.pwfkRef.remove(item) + break; + } + } + }, zyjhzx(data){ console.log(data) if (this.deviceId!==data.msg.deviceId&&data.msg.actionType!=='开始报工'){ @@ -89,7 +97,7 @@ export default { }, methods:{ checkboxAll({checked}) { - this.$message.warning('不允许一次报工多条') + this.baogong1() }, checkboxChange({checked, row}) { const tmpArr=[{ @@ -108,7 +116,7 @@ export default { let ycldwInfo=null for (const dw of this.dw) { for (const info of dw.list) { - if (data.dcCh===info.czbh&&data.dcPl===info.pl&&data.dcFd===info.fd&&data.tzbh===info.tlth){ + if (data.dcCh===info.czbh&&data.dcPl===info.pl&&data.tzbh===info.tlth){ ycldwInfo=info break } @@ -131,6 +139,34 @@ export default { } }) }, + baogong1(){ + const data=this.$refs.pwfkRef.getCheckboxRecords(); + const tmpArr=[] + for (const item of data) { + const data={ + id:item.id, + pwfkry: this.$props.worker().userCode, + zt:item.zt, + dcCh:item.dcCh, + dcPl:item.dcPl, + dcFd:item.dcFd, + tzbh:item.tzbh, + } + tmpArr.push(data) + } + VXETable.modal.confirm('您确定报工吗?').then(res => { + res === 'confirm' && zx({ + field:'pwfkrq', + zxZtName:'PWFK', + list:tmpArr, + }).then(res=>{ + if (res.success){ + window.localStorage.removeItem('zyjh') + //this.initData(this.$props.worker().userCode,'31') + } + }) + }) + }, baogong0(tmpArr,data){ let ycldwInfo=null for (const dw of this.dw) { diff --git a/src/views/zyjhzx/qgefkui/comps/pgdTable.js b/src/views/zyjhzx/qgefkui/comps/pgdTable.js index ecfbff8..f24351e 100644 --- a/src/views/zyjhzx/qgefkui/comps/pgdTable.js +++ b/src/views/zyjhzx/qgefkui/comps/pgdTable.js @@ -59,6 +59,15 @@ export default function () { return '' } + const formatKw=function ({cellValue}){ + for (const item of this.ycldw) { + if (cellValue===item.bm){ + return item.bmsm + } + } + return cellValue; + } + const columns = [ { type: 'checkbox', width: 40 }, { type: 'seq',title:'序号', width: 50 }, @@ -77,7 +86,11 @@ export default function () { {field: 'wpgg', title: '材质', width: 80}, {field: 'wpxh', title: '规格', width: 70}, {field: 'sllph', title: '炉批号', width: 100}, - {field: '_lx', title: '流向', width: 80,formatter:formatLx, + {field: 'zl', title: '组立', width: 100, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination', }, + }, + {field: 'kw', title: '流向', width: 80,formatter:formatKw, filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], filterRender: { name: 'FilterCombination', }, },