From 0718967219d8dcf9a877d9d3f155cd70b302e4f0 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, 8 Jul 2025 16:59:01 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BD=99=E6=96=99=E5=BA=93=E5=AD=98=E7=AE=A1?= =?UTF-8?q?=E7=90=86(=E6=9C=AA=E5=AE=8C=E6=88=90)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/jhzxgl/ylgl/gd.js | 306 +++++++ src/views/jhzxgl/ylgl/gdsl.vue | 104 +++ src/views/jhzxgl/ylgl/index.js | 130 ++- src/views/jhzxgl/ylgl/ylgl.js | 178 +++++ src/views/jhzxgl/ylgl/{index.vue => ylsl.vue} | 1 + src/views/jhzxgl/ylxx.vue | 687 +--------------- src/views/jhzxgl/ylxx_bak.vue | 751 ++++++++++++++++++ src/views/ylgl/comp/ylmodal.vue | 29 + src/views/ylgl/kc.vue | 41 + src/views/ylgl/lib/kc.js | 220 +++++ src/views/ylgl/lib/ylmodal.js | 306 +++++++ 11 files changed, 2058 insertions(+), 695 deletions(-) create mode 100644 src/views/jhzxgl/ylgl/gd.js create mode 100644 src/views/jhzxgl/ylgl/gdsl.vue create mode 100644 src/views/jhzxgl/ylgl/ylgl.js rename src/views/jhzxgl/ylgl/{index.vue => ylsl.vue} (99%) create mode 100644 src/views/jhzxgl/ylxx_bak.vue create mode 100644 src/views/ylgl/comp/ylmodal.vue create mode 100644 src/views/ylgl/kc.vue create mode 100644 src/views/ylgl/lib/kc.js create mode 100644 src/views/ylgl/lib/ylmodal.js diff --git a/src/views/jhzxgl/ylgl/gd.js b/src/views/jhzxgl/ylgl/gd.js new file mode 100644 index 0000000..8e8c4fa --- /dev/null +++ b/src/views/jhzxgl/ylgl/gd.js @@ -0,0 +1,306 @@ +import request from '@/utils/request' +import { VXETable } from 'vxe-table' +import XLSX from 'xlsx' +const init=function (that){ + + const butClick=function (){ + data.options.formConfig.data.dcCh=that.$refs.projectSelectRef.getDcch() + if (!data.options.formConfig.data.dcCh){ + VXETable.modal.message({ content: '请选择船号', status: 'warning' }) + return + } + getData(data.options.formConfig.data).then(res=>{ + data.options.data=res.data + }) + } + + const 核对=function (){ + const dcCh=that.$refs.xqProjectSelectRef.getDcch(); + const dcPl=data.options.formConfig.data.xqpl + if (!dcCh||!dcPl){ + VXETable.modal.message({ content: '请选择需求船号和批量', status: 'warning' }) + return + } + const table=that.$refs.vGrid + const list=table.getCheckboxRecords() + if (list.length===0){ + VXETable.modal.message({ content: '请选择数据', status: 'warning' }) + return + } + + const _data={ + dcCh:dcCh, + dcPl:dcPl, + ylList:list + } + 核对数据(_data).then(res=>{ + const data=res.data + VXETable.modal.message({ content: `核对结束,匹配${data.length}张套料图`, status: 'warning' }) + for (const item of data) { + for (let it of list) { + if (it.id===item.id){ + it=Object.assign(it,item) + break; + } + } + } + }) + } + + const 保存=()=>{ + const list=that.$refs.vGrid.getCheckboxRecords() + if (list.length>0){ + edit(list).then(res=>{ + VXETable.modal.message({ content: '成功', status: 'success' }) + butClick() + }) + } + } + + const 打印=()=>{ + const list=that.$refs.vGrid.getCheckboxRecords() + if (list.length>0){ + print(list).then(res=>{ + const workBook = XLSX.utils.book_new(); + const _data=list.map(item=>{ + return { + 船号:item.使用船号, + 批量:item.使用批量, + 图纸编号:item.使用图纸, + 余料编号:item.余料编号, + 垛位:item.垛位 + } + }) + const sheet=XLSX.utils.json_to_sheet(_data) + XLSX.utils.book_append_sheet(workBook, sheet, "sheet"); + XLSX.writeFile(workBook, `${data.options.formConfig.dcCh}-${data.options.formConfig.dcPl}余料上料计划.xlsx`) + butClick() + }) + } + } + + const 退回=()=>{ + const list=that.$refs.vGrid.getCheckboxRecords() + if(list.length>0){ + rollback(list).then(()=>{ + VXETable.modal.message({ content: '成功', status: 'success' }) + butClick() + }) + } + } + + + const useStatus=[ + {label:'未使用',value:'0'}, + {label:'未打印',value:'1'}, + {label:'已打印',value:'2'}, + {label:'已切割',value:'3'}, + ] + + const formatUseStatus=({cellValue})=>{ + for (const item of useStatus) { + if(item.value===cellValue){ + return item.label + } + } + return cellValue + } + + const data={ + options:{ + height:830, + align:'center', + border: true, + resizable: true, + keepSource:true, + size:'mini', + showOverflow: true, + showHeaderOverflow:true, + editConfig:{trigger: 'click', mode: 'cell', showStatus: true}, + highlightCurrentRow:true, + formConfig:{ + data:{ + dcCh:'', + dcPl:'', + tzbh:'', + status:'0', + xqch:'', + xqpl:'', + }, + items:[ + { field: 'dcCh', title: '来源船只', span: 3,slots: { default: 'name_czbh' } }, + { field: 'dcPl', title: '来源批量', span: 3 ,itemRender: {name: '$input'}}, + { field: 'tzbh', title: '来源图号', span: 3 ,itemRender: {name: '$input'}}, + { field: 'status', title: '使用状态', span: 3 , + itemRender: {name: '$select',props:{options:useStatus}} + }, + {span: 12, + children:[ + { span: 15,align:'right',itemRender: { + name: '$button', props: {content:'查询',status:'primary'},events:{click:butClick} + } + }, + { align:'right',itemRender: { + name: '$button', props: {content:'核对',status:'primary'},events:{click:核对} + } + }, + { align:'right',itemRender: { + name: '$button', props: {content:'保存',status:'primary'},events:{click:保存} + } + }, + { align:'right',itemRender: { + name: '$button', props: {content:'打印',status:'primary'},events:{click:打印} + } + }, + { align:'right',itemRender: { + name: '$button', props: {content:'退回',status:'primary'},events:{click:退回} + } + }, + ] + }, + { field: 'xqch', title: '需求船只', span: 3,slots: { default: 'name_xqch' } }, + { field: 'xqpl', title: '需求批量', span: 3 ,itemRender: {name: '$input'}}, + ], + }, + columns:[ + {type:'checkbox',title:'序号'}, + {type:'seq',title:''}, + // { field: 'id', title: 'ID', width: 150 }, + { field: '余料编号', title: '余料编号', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '规格', title: '规格', width: 150, + 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: '板长', title: '板长', width: 100 , + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '炉批号', title: '炉批号', width: 140, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '重量', title: '重量', width: 120, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '数量', title: '数量', width: 80, + 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: 80, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用船号', title: '使用船号', width: 120, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用批量', title: '使用批量', width: 120, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用分段', title: '使用分段', width: 120, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用图纸', title: '使用图纸', width: 150, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用日期', title: '使用日期', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '来源船号', title: '来源船号', width: 120, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '来源批量', title: '来源批量', width: 120, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '来源图纸', title: '来源图纸', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '切割日期', title: '切割日期', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '物品型号', title: '物品型号', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '物品规格', title: '物品规格', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + {field: '使用状态', title: '使用状态', width: 120, formatter:formatUseStatus} + ], + data:[], + }, + } + + return data +} + +const getData=(data)=>{ + return request({ + url: "/yl/list", + method: "post", + data, + }); +} + +const 核对数据=(data)=>{ + return request({ + url: "/yl/gdsl", + method: "post", + data, + }); +} + +const edit=(data)=>{ + return request({ + url: "/yl/edit", + method: "post", + data, + }); +} + +const print=(data)=>{ + return request({ + url: "/yl/print", + method: "post", + data, + }); +} + +const rollback=(data)=>{ + return request({ + url: "/yl/rollback", + method: "post", + data, + }); +} + +export default init diff --git a/src/views/jhzxgl/ylgl/gdsl.vue b/src/views/jhzxgl/ylgl/gdsl.vue new file mode 100644 index 0000000..58fdd83 --- /dev/null +++ b/src/views/jhzxgl/ylgl/gdsl.vue @@ -0,0 +1,104 @@ + + + + diff --git a/src/views/jhzxgl/ylgl/index.js b/src/views/jhzxgl/ylgl/index.js index 6500725..6012601 100644 --- a/src/views/jhzxgl/ylgl/index.js +++ b/src/views/jhzxgl/ylgl/index.js @@ -3,11 +3,14 @@ import { VXETable } from 'vxe-table' import XLSX from 'xlsx' const init=function (that){ - let list=[] const butClick=function (){ data.options.formConfig.data.dcCh=that.$refs.projectSelectRef.getDcch() + if (!data.options.formConfig.data.dcCh){ + VXETable.modal.message({ content: '请选择船号', status: 'warning' }) + return + } getData(data.options.formConfig.data).then(res=>{ - list=res.data + data.options.data=res.data }) } @@ -32,6 +35,7 @@ const init=function (that){ } 核对数据(_data).then(res=>{ const data=res.data + VXETable.modal.message({ content: `核对结束,匹配${data.length}张套料图`, status: 'warning' }) for (const item of data) { for (let it of list) { if (it.id===item.id){ @@ -104,13 +108,14 @@ const init=function (that){ const data={ options:{ - height:800, + height:830, align:'center', border: true, resizable: true, keepSource:true, size:'mini', showOverflow: true, + showHeaderOverflow:true, editConfig:{trigger: 'click', mode: 'cell', showStatus: true}, highlightCurrentRow:true, formConfig:{ @@ -118,7 +123,7 @@ const init=function (that){ dcCh:'', dcPl:'', tzbh:'', - status:'', + status:'0', xqch:'', xqpl:'', }, @@ -131,7 +136,7 @@ const init=function (that){ }, {span: 12, children:[ - { span: 14,align:'right',itemRender: { + { span: 15,align:'right',itemRender: { name: '$button', props: {content:'查询',status:'primary'},events:{click:butClick} } }, @@ -158,31 +163,100 @@ const init=function (that){ ], }, columns:[ - { field: 'id', title: 'ID', width: 150 }, - { field: '余料编号', title: '余料编号', width: 150 }, - { field: '规格', title: '规格', width: 150 }, - { field: '板厚', title: '板厚', width: 100 }, - { field: '板宽', title: '板宽', width: 100 }, - { field: '板长', title: '板长', width: 100 }, - { field: '炉批号', title: '炉批号', width: 150 }, - { field: '重量', title: '重量', width: 120 }, - { field: '数量', title: '数量', width: 80 }, - { field: '垛位', title: '垛位', width: 100 }, - { field: '层数', title: '层数', width: 80 }, - { field: '来源船号', title: '来源船号', width: 120 }, - { field: '来源批量', title: '来源批量', width: 120 }, - { field: '来源图纸', title: '来源图纸', width: 150 }, - { field: '物品型号', title: '物品型号', width: 150 }, - { field: '物品规格', title: '物品规格', width: 150 }, - { field: '切割日期', title: '切割日期', width: 150 }, - { field: '使用船号', title: '使用船号', width: 120 }, - { field: '使用批量', title: '使用批量', width: 120 }, - { field: '使用分段', title: '使用分段', width: 120 }, - { field: '使用图纸', title: '使用图纸', width: 150 }, - { field: '使用日期', title: '使用日期', width: 150 }, + {type:'checkbox',title:'序号'}, + {type:'seq',title:''}, + // { field: 'id', title: 'ID', width: 150 }, + { field: '余料编号', title: '余料编号', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '规格', title: '规格', width: 150, + 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: '板长', title: '板长', width: 100 , + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '炉批号', title: '炉批号', width: 140, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '重量', title: '重量', width: 120, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '数量', title: '数量', width: 80, + 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: 80, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用船号', title: '使用船号', width: 120, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用批量', title: '使用批量', width: 120, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用分段', title: '使用分段', width: 120, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用图纸', title: '使用图纸', width: 150, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用日期', title: '使用日期', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '来源船号', title: '来源船号', width: 120, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '来源批量', title: '来源批量', width: 120, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '来源图纸', title: '来源图纸', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '切割日期', title: '切割日期', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '物品型号', title: '物品型号', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '物品规格', title: '物品规格', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, {field: '使用状态', title: '使用状态', width: 120, formatter:formatUseStatus} ], - data:list, + data:[], }, } diff --git a/src/views/jhzxgl/ylgl/ylgl.js b/src/views/jhzxgl/ylgl/ylgl.js new file mode 100644 index 0000000..a81eb46 --- /dev/null +++ b/src/views/jhzxgl/ylgl/ylgl.js @@ -0,0 +1,178 @@ +import request from '@/utils/request' +import { VXETable } from 'vxe-table' +import XLSX from 'xlsx' +const init=function (that){ + + const butClick=function (){ + data.options.formConfig.data.dcCh=that.$refs.projectSelectRef.getDcch() + if (!data.options.formConfig.data.dcCh){ + VXETable.modal.message({ content: '请选择船号', status: 'warning' }) + return + } + getData(data.options.formConfig.data).then(res=>{ + data.options.data=res.data + }) + } + + + const 保存=()=>{ + const updateRecord=that.$refs.vGrid.getUpdateRecords() + if (updateRecord.length>0){ + edit(updateRecord).then(res=>{ + VXETable.modal.message({ content: '成功', status: 'success' }) + butClick() + }) + } + } + + const useStatus=[ + {label:'未使用',value:'0'}, + {label:'未打印',value:'1'}, + {label:'已打印',value:'2'}, + {label:'已切割',value:'3'}, + ] + + const formatUseStatus=({cellValue})=>{ + for (const item of useStatus) { + if(item.value===cellValue){ + return item.label + } + } + return cellValue + } + + const data={ + options:{ + height:830, + align:'center', + border: true, + resizable: true, + keepSource:true, + size:'mini', + showOverflow: true, + showHeaderOverflow:true, + editConfig:{trigger: 'click', mode: 'cell', showStatus: true}, + highlightCurrentRow:true, + formConfig:{ + data:{ + dcCh:'', + dcPl:'', + tzbh:'', + status:'0', + }, + items:[ + { field: 'dcCh', title: '来源船只', span: 3,slots: { default: 'name_czbh' } }, + { field: 'dcPl', title: '来源批量', span: 3 ,itemRender: {name: '$input'}}, + { field: 'tzbh', title: '来源图号', span: 3 ,itemRender: {name: '$input'}}, + { field: 'status', title: '使用状态', span: 3 , + itemRender: {name: '$select',props:{options:useStatus,disabled:true}} + }, + {span: 12, + children:[ + { span: 21,align:'right',itemRender: { + name: '$button', props: {content:'查询',status:'primary'},events:{click:butClick} + } + }, + { align:'right',itemRender: { + name: '$button', props: {content:'保存',status:'primary'},events:{click:保存} + } + }, + ] + }, + ], + }, + columns:[ + {type:'checkbox',title:'序号'}, + {type:'seq',title:''}, + { field: '余料编号', title: '余料编号', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '规格', title: '规格', width: 150, + 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: '板长', title: '板长', width: 100 , + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '炉批号', title: '炉批号', width: 140, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '重量', title: '重量', width: 120, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '数量', title: '数量', width: 80, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '垛位', title: '垛位', width: 100, + editRender:{name:'$input',}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '层数', title: '层数', width: 80, + editRender:{name:'$input',}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '来源船号', title: '来源船号', width: 120, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '来源批量', title: '来源批量', width: 120, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '来源图纸', title: '来源图纸', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '切割日期', title: '切割日期', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '物品型号', title: '物品型号', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '物品规格', title: '物品规格', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + {field: '使用状态', title: '使用状态', width: 120, formatter:formatUseStatus} + ], + data:[], + }, + } + + return data +} + +const getData=(data)=>{ + return request({ + url: "/yl/list", + method: "post", + data, + }); +} + +const edit=(data)=>{ + return request({ + url: "/yl/edit", + method: "post", + data, + }); +} + +export default init diff --git a/src/views/jhzxgl/ylgl/index.vue b/src/views/jhzxgl/ylgl/ylsl.vue similarity index 99% rename from src/views/jhzxgl/ylgl/index.vue rename to src/views/jhzxgl/ylgl/ylsl.vue index dd2920d..2822a7c 100644 --- a/src/views/jhzxgl/ylgl/index.vue +++ b/src/views/jhzxgl/ylgl/ylsl.vue @@ -21,6 +21,7 @@ import ProjectSelect from "@/components/ProjectSelect/index.vue"; import init from "./index"; export default { + name:'YLSLGL', components: {ProjectSelect}, data(){ return{ diff --git a/src/views/jhzxgl/ylxx.vue b/src/views/jhzxgl/ylxx.vue index 28479fd..0660df2 100644 --- a/src/views/jhzxgl/ylxx.vue +++ b/src/views/jhzxgl/ylxx.vue @@ -1,687 +1,40 @@ - + diff --git a/src/views/ylgl/comp/ylmodal.vue b/src/views/ylgl/comp/ylmodal.vue new file mode 100644 index 0000000..3d9dd53 --- /dev/null +++ b/src/views/ylgl/comp/ylmodal.vue @@ -0,0 +1,29 @@ + + + diff --git a/src/views/ylgl/kc.vue b/src/views/ylgl/kc.vue new file mode 100644 index 0000000..c8b6df3 --- /dev/null +++ b/src/views/ylgl/kc.vue @@ -0,0 +1,41 @@ + + + diff --git a/src/views/ylgl/lib/kc.js b/src/views/ylgl/lib/kc.js new file mode 100644 index 0000000..6b3c78d --- /dev/null +++ b/src/views/ylgl/lib/kc.js @@ -0,0 +1,220 @@ +import request from '@/utils/request' +import { VXETable } from 'vxe-table' +const init=function (that){ + + const butClick=function (){ + data.options.formConfig.data.dcCh=that.$refs.projectSelectRef.getDcch() + if (!data.options.formConfig.data.dcCh){ + VXETable.modal.message({ content: '请选择船号', status: 'warning' }) + return + } + getData(data.options.formConfig.data).then(res=>{ + data.options.data=res.data + }) + } + + const 保存=()=>{ + const list=that.$refs.vGrid.getCheckboxRecords() + if (list.length>0){ + edit(list).then(res=>{ + VXETable.modal.message({ content: '成功', status: 'success' }) + butClick() + }) + } + } + + const 退回=()=>{ + const list=that.$refs.vGrid.getCheckboxRecords() + if(list.length>0){ + rollback(list).then(()=>{ + VXETable.modal.message({ content: '成功', status: 'success' }) + butClick() + }) + } + } + + + const useStatus=[ + {label:'未使用',value:'0'}, + {label:'未打印',value:'1'}, + {label:'已打印',value:'2'}, + {label:'已切割',value:'3'}, + ] + + const formatUseStatus=({cellValue})=>{ + for (const item of useStatus) { + if(item.value===cellValue){ + return item.label + } + } + return cellValue + } + + const data={ + options:{ + height:830, + align:'center', + border: true, + resizable: true, + keepSource:true, + size:'mini', + showOverflow: true, + showHeaderOverflow:true, + editConfig:{trigger: 'click', mode: 'cell', showStatus: true}, + highlightCurrentRow:true, + formConfig:{ + data:{ + dcCh:'', + dcPl:'', + tzbh:'', + }, + items:[ + { field: 'dcCh', title: '来源船只', span: 3,slots: { default: 'name_czbh' } }, + { field: 'dcPl', title: '来源批量', span: 3 ,itemRender: {name: '$input'}}, + { field: 'tzbh', title: '来源图号', span: 3 ,itemRender: {name: '$input'}}, + { field: 'status', title: '使用状态', span: 3 , + itemRender: {name: '$select',props:{options:useStatus}} + }, + {span: 12, + children:[ + { span: 18,align:'right',itemRender: { + name: '$button', props: {content:'查询',status:'primary'},events:{click:butClick} + } + }, + { align:'right',itemRender: { + name: '$button', props: {content:'保存',status:'primary'},events:{click:保存} + } + }, + { align:'right',itemRender: { + name: '$button', props: {content:'退回',status:'primary'},events:{click:退回} + } + }, + ] + }, + ], + }, + columns:[ + {type:'checkbox',title:'序号'}, + {type:'seq',title:''}, + { field: '余料编号', title: '余料编号', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '规格', title: '规格', width: 150, + 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: '板长', title: '板长', width: 100 , + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '炉批号', title: '炉批号', width: 140, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '重量', title: '重量', width: 120, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '数量', title: '数量', width: 80, + 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: 80, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用船号', title: '使用船号', width: 120, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用批量', title: '使用批量', width: 120, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用分段', title: '使用分段', width: 120, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用图纸', title: '使用图纸', width: 150, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用日期', title: '使用日期', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '来源船号', title: '来源船号', width: 120, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '来源批量', title: '来源批量', width: 120, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '来源图纸', title: '来源图纸', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '切割日期', title: '切割日期', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '物品型号', title: '物品型号', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '物品规格', title: '物品规格', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + {field: '使用状态', title: '使用状态', width: 120, formatter:formatUseStatus} + ], + data:[], + }, + } + + return data +} + +const getData=(data)=>{ + return request({ + url: "/yl/list", + method: "post", + data, + }); +} + +const edit=(data)=>{ + return request({ + url: "/yl/edit", + method: "post", + data, + }); +} + +const rollback=(data)=>{ + return request({ + url: "/yl/rollback", + method: "post", + data, + }); +} + +export default init diff --git a/src/views/ylgl/lib/ylmodal.js b/src/views/ylgl/lib/ylmodal.js new file mode 100644 index 0000000..8e8c4fa --- /dev/null +++ b/src/views/ylgl/lib/ylmodal.js @@ -0,0 +1,306 @@ +import request from '@/utils/request' +import { VXETable } from 'vxe-table' +import XLSX from 'xlsx' +const init=function (that){ + + const butClick=function (){ + data.options.formConfig.data.dcCh=that.$refs.projectSelectRef.getDcch() + if (!data.options.formConfig.data.dcCh){ + VXETable.modal.message({ content: '请选择船号', status: 'warning' }) + return + } + getData(data.options.formConfig.data).then(res=>{ + data.options.data=res.data + }) + } + + const 核对=function (){ + const dcCh=that.$refs.xqProjectSelectRef.getDcch(); + const dcPl=data.options.formConfig.data.xqpl + if (!dcCh||!dcPl){ + VXETable.modal.message({ content: '请选择需求船号和批量', status: 'warning' }) + return + } + const table=that.$refs.vGrid + const list=table.getCheckboxRecords() + if (list.length===0){ + VXETable.modal.message({ content: '请选择数据', status: 'warning' }) + return + } + + const _data={ + dcCh:dcCh, + dcPl:dcPl, + ylList:list + } + 核对数据(_data).then(res=>{ + const data=res.data + VXETable.modal.message({ content: `核对结束,匹配${data.length}张套料图`, status: 'warning' }) + for (const item of data) { + for (let it of list) { + if (it.id===item.id){ + it=Object.assign(it,item) + break; + } + } + } + }) + } + + const 保存=()=>{ + const list=that.$refs.vGrid.getCheckboxRecords() + if (list.length>0){ + edit(list).then(res=>{ + VXETable.modal.message({ content: '成功', status: 'success' }) + butClick() + }) + } + } + + const 打印=()=>{ + const list=that.$refs.vGrid.getCheckboxRecords() + if (list.length>0){ + print(list).then(res=>{ + const workBook = XLSX.utils.book_new(); + const _data=list.map(item=>{ + return { + 船号:item.使用船号, + 批量:item.使用批量, + 图纸编号:item.使用图纸, + 余料编号:item.余料编号, + 垛位:item.垛位 + } + }) + const sheet=XLSX.utils.json_to_sheet(_data) + XLSX.utils.book_append_sheet(workBook, sheet, "sheet"); + XLSX.writeFile(workBook, `${data.options.formConfig.dcCh}-${data.options.formConfig.dcPl}余料上料计划.xlsx`) + butClick() + }) + } + } + + const 退回=()=>{ + const list=that.$refs.vGrid.getCheckboxRecords() + if(list.length>0){ + rollback(list).then(()=>{ + VXETable.modal.message({ content: '成功', status: 'success' }) + butClick() + }) + } + } + + + const useStatus=[ + {label:'未使用',value:'0'}, + {label:'未打印',value:'1'}, + {label:'已打印',value:'2'}, + {label:'已切割',value:'3'}, + ] + + const formatUseStatus=({cellValue})=>{ + for (const item of useStatus) { + if(item.value===cellValue){ + return item.label + } + } + return cellValue + } + + const data={ + options:{ + height:830, + align:'center', + border: true, + resizable: true, + keepSource:true, + size:'mini', + showOverflow: true, + showHeaderOverflow:true, + editConfig:{trigger: 'click', mode: 'cell', showStatus: true}, + highlightCurrentRow:true, + formConfig:{ + data:{ + dcCh:'', + dcPl:'', + tzbh:'', + status:'0', + xqch:'', + xqpl:'', + }, + items:[ + { field: 'dcCh', title: '来源船只', span: 3,slots: { default: 'name_czbh' } }, + { field: 'dcPl', title: '来源批量', span: 3 ,itemRender: {name: '$input'}}, + { field: 'tzbh', title: '来源图号', span: 3 ,itemRender: {name: '$input'}}, + { field: 'status', title: '使用状态', span: 3 , + itemRender: {name: '$select',props:{options:useStatus}} + }, + {span: 12, + children:[ + { span: 15,align:'right',itemRender: { + name: '$button', props: {content:'查询',status:'primary'},events:{click:butClick} + } + }, + { align:'right',itemRender: { + name: '$button', props: {content:'核对',status:'primary'},events:{click:核对} + } + }, + { align:'right',itemRender: { + name: '$button', props: {content:'保存',status:'primary'},events:{click:保存} + } + }, + { align:'right',itemRender: { + name: '$button', props: {content:'打印',status:'primary'},events:{click:打印} + } + }, + { align:'right',itemRender: { + name: '$button', props: {content:'退回',status:'primary'},events:{click:退回} + } + }, + ] + }, + { field: 'xqch', title: '需求船只', span: 3,slots: { default: 'name_xqch' } }, + { field: 'xqpl', title: '需求批量', span: 3 ,itemRender: {name: '$input'}}, + ], + }, + columns:[ + {type:'checkbox',title:'序号'}, + {type:'seq',title:''}, + // { field: 'id', title: 'ID', width: 150 }, + { field: '余料编号', title: '余料编号', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '规格', title: '规格', width: 150, + 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: '板长', title: '板长', width: 100 , + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '炉批号', title: '炉批号', width: 140, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '重量', title: '重量', width: 120, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '数量', title: '数量', width: 80, + 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: 80, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用船号', title: '使用船号', width: 120, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用批量', title: '使用批量', width: 120, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用分段', title: '使用分段', width: 120, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用图纸', title: '使用图纸', width: 150, + editRender:{name:'$input'}, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '使用日期', title: '使用日期', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '来源船号', title: '来源船号', width: 120, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '来源批量', title: '来源批量', width: 120, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '来源图纸', title: '来源图纸', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '切割日期', title: '切割日期', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '物品型号', title: '物品型号', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + { field: '物品规格', title: '物品规格', width: 150, + filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }], + filterRender: { name: 'FilterCombination' } + }, + {field: '使用状态', title: '使用状态', width: 120, formatter:formatUseStatus} + ], + data:[], + }, + } + + return data +} + +const getData=(data)=>{ + return request({ + url: "/yl/list", + method: "post", + data, + }); +} + +const 核对数据=(data)=>{ + return request({ + url: "/yl/gdsl", + method: "post", + data, + }); +} + +const edit=(data)=>{ + return request({ + url: "/yl/edit", + method: "post", + data, + }); +} + +const print=(data)=>{ + return request({ + url: "/yl/print", + method: "post", + data, + }); +} + +const rollback=(data)=>{ + return request({ + url: "/yl/rollback", + method: "post", + data, + }); +} + +export default init