From 2d65162ecc864b9602c0e0fa9c2d11e9108b4e6a Mon Sep 17 00:00:00 2001 From: xhj Date: Mon, 27 Nov 2023 13:03:15 +0800 Subject: [PATCH] bom copy --- src/api/sjzx/jcsj.js | 1 + src/views/sjzx/bomcx.vue | 255 +++---- src/views/sjzx/components/SelectBom.vue | 925 ++++++++++++++++++++++++ src/views/sjzx/czbhwh.vue | 1 + 4 files changed, 1044 insertions(+), 138 deletions(-) create mode 100644 src/views/sjzx/components/SelectBom.vue diff --git a/src/api/sjzx/jcsj.js b/src/api/sjzx/jcsj.js index f7d5aa9..c4eb9b9 100644 --- a/src/api/sjzx/jcsj.js +++ b/src/api/sjzx/jcsj.js @@ -38,6 +38,7 @@ export function uploadBom(data) { export function getListBom(data) {return request({url: '/dmBom/getListBom', method: 'post', data})} export function getListBomRealy(data) {return request({url: '/dmBom/getListBomRealy', method: 'post', data})} +export function getListBomRealy1(data) {return request({url: '/dmBom/getListBomRealy1', method: 'post', data})} export function addListBom(data) {return request({url: '/dmBom/addListBom', method: 'post', data})} export function saveListBom(data) {return request({url: '/dmBom/saveListBom', method: 'post', data})} export function copyListBom(data) {return request({url: '/dmBom/copyListBom', method: 'post', data})} diff --git a/src/views/sjzx/bomcx.vue b/src/views/sjzx/bomcx.vue index 71ea25c..f266535 100644 --- a/src/views/sjzx/bomcx.vue +++ b/src/views/sjzx/bomcx.vue @@ -9,38 +9,62 @@ - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - + + + + + + @@ -129,93 +153,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -232,18 +173,20 @@ import {null2str} from "@/utils/rpkj"; import { getToken } from '@/utils/auth' import { startLoading, endLoading } from '@/utils' import { Message } from 'element-ui' +import SelectBom from '@/views/sjzx/components/SelectBom' export default { name:'Bomcx', + components: {SelectBom}, data() { return { optionsstats:[ { - value1:'', - label1: '未提交' + value1:'B', + label1: '板材' }, { - value1:'02', - label1: '已提交' + value1:'X', + label1: '型材' } ], @@ -259,6 +202,16 @@ export default { uploadData:{ }, + projectData:[], + projectData1:[], + projectColumns: [ + {field: 'cbbm', title: '船号',width: 110}, + { field: 'wgbs', title: '完工标识', width: 80, + slots:{ + default: 'wgbsEdit' + }, + }, + ], tableupload:[], dialogVisible:false, heads: { token: getToken() }, @@ -601,6 +554,29 @@ export default { }, methods: { + cellClickEvent({row}) { + this.queryParam.dcch = row.cbbm + this.$refs.xDown4.hidePanel() + }, + focusEvent4() { + this.$refs.xDown4.showPanel() + }, + keyupEvent4() { + console.log(1); + + if (this.queryParam.dcch) { + console.log(this.projectData1); + this.projectData = this.projectData1.filter(row => row.cbbm.indexOf(this.queryParam.dcch.toUpperCase()) > -1) + } else { + this.projectData = this.projectData1.slice(0) + } + + }, + callback(obj, inputFive) { + + // this.loadData() + + }, uploadExcel() { if (this.queryParam.cbbm === '') { @@ -730,9 +706,7 @@ export default { this.fileList = fileList }, - sucessChange(file,fileList){ - alert(1) - }, + //上传服务器 submitUpload() { //判断是否有文件再上传 @@ -792,6 +766,8 @@ export default { initBase(){ getCzplBase({}).then(res=>{ this.dictData = res.data + this.projectData=res.data.cbbm + this.projectData1=res.data.cbbm // const xGrid = this.$refs.xGrid // // const dwbm = xGrid.getColumnByField('dwbm') @@ -833,25 +809,28 @@ export default { this.height = window.innerHeight - 190 }, copy(){ - if(this.queryParam.dcch===this.queryParam.mbch){ - this.$message.warning('船号和目标船号不能一致') - return - } - if(this.queryParam.dcch==='' || this.queryParam.dcch===null ){ - this.$message.warning('船号不能为空') - return - } - if(this.queryParam.mbch==='' || this.queryParam.mbch===null ){ - this.$message.warning('目标船号不能为空') - return - } - copyListBom(this.queryParam).then(res=>{ - if(res.success){ - this.queryParam.dcch=this.queryParam.mbch; - this.queryParam.mbch='' - this.initList(); - } - }) + + + this.$refs.selectBom.show() + // if(this.queryParam.dcch===this.queryParam.mbch){ + // this.$message.warning('船号和目标船号不能一致') + // return + // } + // if(this.queryParam.dcch==='' || this.queryParam.dcch===null ){ + // this.$message.warning('船号不能为空') + // return + // } + // if(this.queryParam.mbch==='' || this.queryParam.mbch===null ){ + // this.$message.warning('目标船号不能为空') + // return + // } + // copyListBom(this.queryParam).then(res=>{ + // if(res.success){ + // this.queryParam.dcch=this.queryParam.mbch; + // this.queryParam.mbch='' + // this.initList(); + // } + // }) }, tjClick(){ let selectRecords = this.$refs.xGrid.getCheckboxRecords() diff --git a/src/views/sjzx/components/SelectBom.vue b/src/views/sjzx/components/SelectBom.vue new file mode 100644 index 0000000..66653e3 --- /dev/null +++ b/src/views/sjzx/components/SelectBom.vue @@ -0,0 +1,925 @@ + + + + diff --git a/src/views/sjzx/czbhwh.vue b/src/views/sjzx/czbhwh.vue index de53ca7..e6ad0be 100644 --- a/src/views/sjzx/czbhwh.vue +++ b/src/views/sjzx/czbhwh.vue @@ -238,6 +238,7 @@ export default { }, { field: 'shrq', title: '试航日期', width: 120, editRender: { name: '$input', + props: {type: 'date', labelFormat: "yyyy/MM/dd", valueFormat: "yyyy/MM/dd"}, formatter: this.formatDate, events: {change: this.selectChange}