| | |
| | | <el-button type="primary">查询</el-button> |
| | | </el-row> |
| | | </div> |
| | | |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | alert('我接收到子组件传送的编辑信息') |
| | | alert('点击了保存') |
| | | //router.push({path: '/main/processCard/AddProcessCard', query: { id: row.id }}) |
| | | break |
| | | } |
| | |
| | | {title: '操作', width: 70, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | |
| | | {field: 'reworkTeams',width: 90, title: '返工班组', editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | {field: 'reworkNumber',width: 120, title: '返工编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: 'salesOrderNo',width: 120, title: '销售单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'processCardNo',width: 120, title: '流程卡号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'entryName', width: 120,title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'batch',width: 80, title: '批次', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'serialNumber',width: 80, title: '序号', sortable: true}, |
| | | {field: 'singlePieceName',width: 120, title: '单片名称', sortable: true}, |
| | | {field: 'marking',width: 80, title: '标记', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'pieces',width: 90, title: '片标记', sortable: true}, |
| | | {field: 'number',width: 80, title: '数量', sortable: true}, |
| | | {field: 'width',width: 80, title: '宽', sortable: true}, |
| | | {field: 'height',width: 80, title: '高', sortable: true}, |
| | | {field: 'shape',width: 80, title: '形状', sortable: true}, |
| | | {field: 'type',width: 100, title: '返工工序', sortable: true}, |
| | | {field: 'type',width: 100, title: '返工类型', sortable: true}, |
| | | {field: 'damage',width: 120, title: '返工原因', sortable: true}, |
| | | {field: 'device',width: 120, title: '责任设备', sortable: true}, |
| | | {field: 'teams',width: 120, title: '责任班组', sortable: true}, |
| | | {field: 'area',width: 120, title: '返工面积', sortable: true}, |
| | | {field: 'qualityInspector',width: 100, title: '质检员', sortable: true} |
| | | {field: 'reworkTeams',width: 150, title: '返工班组', editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | /* {field: 'reworkNumber',width: 120, title: '返工编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' } /!* , sortable: true*!/, },*/ |
| | | {field: 'salesOrderNo',width: 120, title: '销售单号' /* , sortable: true*/,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'processCardNo',width: 120, title: '流程卡号' /* , sortable: true*/,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'entryName', width: 120,title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' } /* , sortable: true*/}, |
| | | {field: 'batch',width: 80, title: '批次' /* , sortable: true*/,showOverflow:"ellipsis"}, |
| | | {field: 'serialNumber',width: 80, title: '序号' /* , sortable: true*/}, |
| | | {field: 'singlePieceName',width: 120, title: '单片名称' /* , sortable: true*/}, |
| | | {field: 'marking',width: 80, title: '标记' /* , sortable: true*/,showOverflow:"ellipsis"}, |
| | | {field: 'pieces',width: 90, title: '片标记' /* , sortable: true*/}, |
| | | {field: 'number',width: 80, title: '数量' /* , sortable: true*/}, |
| | | {field: 'width',width: 80, title: '宽' /* , sortable: true*/}, |
| | | {field: 'height',width: 80, title: '高' /* , sortable: true*/}, |
| | | {field: 'shape',width: 80, title: '形状' /* , sortable: true*/}, |
| | | {field: 'type',width: 100, title: '返工工序' /* , sortable: true*/}, |
| | | {field: 'type',width: 100, title: '返工类型' /* , sortable: true*/}, |
| | | {field: 'damage',width: 120, title: '返工原因' /* , sortable: true*/}, |
| | | {field: 'device',width: 120, title: '责任设备' /* , sortable: true*/}, |
| | | {field: 'teams',width: 120, title: '责任班组' /* , sortable: true*/}, |
| | | {field: 'area',width: 120, title: '返工面积' /* , sortable: true*/}, |
| | | {field: 'qualityInspector',width: 100, title: '质检员' /* , sortable: true*/} |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | }) |
| | | ] |
| | | } |
| | | |
| | | , |
| | | /*合并脚*/ |
| | | mergeFooterItems: [ |
| | | {row: 0, col: 0, rowspan: 1, colspan: 2} |
| | | ], |
| | | }) |
| | | |
| | | |
| | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">保存</el-button> |
| | | |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | .main-div-customer{ |
| | | width: 99%; |
| | | height: 100%; |
| | | height: 98%; |
| | | } |
| | | |
| | | </style> |
| | |
| | | /*main-body样式*/ |
| | | #main-body{ |
| | | width: 99%; |
| | | height: 92%; |
| | | margin-top: 1%; |
| | | height: 95%; |
| | | /*margin-top: 1%;*/ |
| | | } |
| | | </style> |
| | |
| | | <script setup> |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | let router=useRouter() |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | |
| | | let router = useRouter() |
| | | const dateValue = ref("");//查询日期 |
| | | const dialogFormVisible = ref(false) |
| | | const formLabelWidth = '140px' |
| | | |
| | |
| | | resource: '', |
| | | desc: '', |
| | | }) |
| | | const getTableRow = (row,type) =>{ |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | case 'edit' : { |
| | | console.log(type) |
| | | |
| | | // router.push({path: '/main/Rework/SelectRework', query: { id: row.id }}) |
| | | // router.push({path: '/main/Rework/SelectRework', query: { id: row.id }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | case 'delete': { |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'setType':{ |
| | | case 'setType': { |
| | | alert('我接收到子组件传送的排版状态') |
| | | break |
| | | } |
| | |
| | | //子组件接收参数 |
| | | |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | scrollY: {enabled: true},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {title: '操作', width: 110, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: 'reworkNumber',width: 120, title: '返工编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: 'salesOrderNo',width: 120, title: '销售单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'processCardNo',width: 120, title: '流程卡号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'entryName', width: 120,title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'batch',width: 80, title: '批次', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'serialNumber',width: 80, title: '序号', sortable: true}, |
| | | {field: 'singlePieceName',width: 120, title: '单片名称', sortable: true}, |
| | | {field: 'marking',width: 80, title: '标记', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'pieces',width: 90, title: '片标记', sortable: true}, |
| | | {field: 'number',width: 80, title: '数量', sortable: true}, |
| | | {field: 'width',width: 80, title: '宽', sortable: true}, |
| | | {field: 'height',width: 80, title: '高', sortable: true}, |
| | | {field: 'shape',width: 80, title: '形状', sortable: true}, |
| | | {field: 'type',width: 100, title: '返工类型', sortable: true}, |
| | | {field: 'damage',width: 120, title: '返工原因', sortable: true}, |
| | | {field: 'device',width: 120, title: '责任设备', sortable: true}, |
| | | {field: 'teams',width: 120, title: '责任班组', sortable: true}, |
| | | {field: 'area',width: 120, title: '返工面积', sortable: true}, |
| | | {field: 'reworkProcess',width: 120, title: '返工工序', sortable: true}, |
| | | {field: 'reworkTeams',width: 120, title: '返工班组', sortable: true}, |
| | | {field: 'qualityInspector',width: 100, title: '质检员', sortable: true} |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {title: '操作', width: 110, slots: {default: 'button_slot'}, fixed: "left"}, |
| | | {type: 'seq', fixed: "left", title: '自序', width: 50}, |
| | | { |
| | | field: 'reworkNumber', |
| | | width: 120, |
| | | title: '返工编号', |
| | | filters: [{data: ''}],/*slots: { filter: 'num1_filter' } ,*/ |
| | | }, |
| | | { |
| | | field: 'salesOrderNo', |
| | | width: 120, |
| | | title: '销售单号', |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'} |
| | | }, |
| | | {field: 'processCardNo', width: 120, title: '流程卡号', filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'entryName', width: 120, title: '项目名称', filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'batch', width: 80, title: '批次', showOverflow: "ellipsis"}, |
| | | {field: 'serialNumber', width: 80, title: '序号'}, |
| | | {field: 'singlePieceName', width: 120, title: '单片名称'}, |
| | | {field: 'marking', width: 80, title: '标记', showOverflow: "ellipsis"}, |
| | | {field: 'pieces', width: 90, title: '片标记'}, |
| | | {field: 'number', width: 80, title: '数量'}, |
| | | {field: 'width', width: 80, title: '宽'}, |
| | | {field: 'height', width: 80, title: '高'}, |
| | | {field: 'shape', width: 80, title: '形状'}, |
| | | {field: 'type', width: 100, title: '返工类型'}, |
| | | {field: 'damage', width: 120, title: '返工原因'}, |
| | | {field: 'device', width: 120, title: '责任设备'}, |
| | | {field: 'teams', width: 120, title: '责任班组'}, |
| | | {field: 'area', width: 120, title: '返工面积'}, |
| | | {field: 'reworkProcess', width: 120, title: '返工工序'}, |
| | | {field: 'reworkTeams', width: 120, title: '返工班组'}, |
| | | {field: 'qualityInspector', width: 100, title: '质检员'} |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | data: [ |
| | | { |
| | | |
| | | reworkNumber:'FG20202020', |
| | | salesOrderNo:'NG23010101', |
| | | processCardNo:'NG23010101A01', |
| | | entryName:'xxxx', |
| | | batch:'二批三', |
| | | serialNumber:'1', |
| | | area:'23.11', |
| | | qualityInspector:"张三", |
| | | number:'1', |
| | | reworkNumber: 'FG20202020', |
| | | salesOrderNo: 'NG23010101', |
| | | processCardNo: 'NG23010101A01', |
| | | entryName: 'xxxx', |
| | | batch: '二批三', |
| | | serialNumber: '1', |
| | | area: '23.11', |
| | | qualityInspector: "张三", |
| | | number: '1', |
| | | singlePieceName: '6mm白玻平钢(外)', |
| | | marking: '1', |
| | | pieces: '(外)', |
| | | width: '575', |
| | | height:"2241", |
| | | height: "2241", |
| | | shape: '普形', |
| | | reworkTeams:'XX二班', |
| | | reworkTeams: 'XX二班', |
| | | type: '机器', |
| | | damage:'气泡超标', |
| | | reworkProcess:'XXXX', |
| | | device:'XXX' |
| | | damage: '气泡超标', |
| | | reworkProcess: 'XXXX', |
| | | device: 'XXX' |
| | | }, |
| | | { |
| | | |
| | | reworkNumber:'FG20203333', |
| | | salesOrderNo:'NG23010101', |
| | | processCardNo:'NG23010101A01', |
| | | entryName:'xxxx', |
| | | batch:'二批三', |
| | | serialNumber:'1', |
| | | area:'23.11', |
| | | qualityInspector:"张三", |
| | | number:'1', |
| | | reworkNumber: 'FG20203333', |
| | | salesOrderNo: 'NG23010101', |
| | | processCardNo: 'NG23010101A01', |
| | | entryName: 'xxxx', |
| | | batch: '二批三', |
| | | serialNumber: '1', |
| | | area: '23.11', |
| | | qualityInspector: "张三", |
| | | number: '1', |
| | | singlePieceName: '6mm白玻平钢(外)', |
| | | marking: '1', |
| | | pieces: '(外)', |
| | | width: '575', |
| | | height:"2241", |
| | | height: "2241", |
| | | shape: '普形', |
| | | reworkTeams:'XX二班', |
| | | reworkTeams: 'XX二班', |
| | | type: '机器', |
| | | damage:'气泡超标', |
| | | reworkProcess:'XXXX', |
| | | device:'XXX' |
| | | damage: '气泡超标', |
| | | reworkProcess: 'XXXX', |
| | | device: 'XXX' |
| | | }, |
| | | ],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['number','area'] |
| | | return[ |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['number', 'area'] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | }, mergeFooterItems: [ |
| | | {row: 0, col: 0, rowspan: 1, colspan: 2} |
| | | ],//合并脚 |
| | | |
| | | }) |
| | | |
| | | |
| | | /*查询*/ |
| | | const queryData=()=>{ |
| | | |
| | | /* if(dateValue.value===""){ |
| | | MessageShow("未选择时间,请选择时间后再次进行查询","warning"); |
| | | return; |
| | | }*/ |
| | | |
| | | |
| | | /*else{ |
| | | |
| | | MessageShow(dateValue); |
| | | } |
| | | |
| | | |
| | | console.log(filterData.value);*/ |
| | | //MessageShow(`/Rework/1/100/`+dateValue.value[0]+"/"+dateValue.value[1]+"\r\n"+filterData.value); |
| | | /*console.log(`/Rework/1/100/`+dateValue.value); |
| | | debugger*/ |
| | | request.post(`/rework/query/1/100/${dateValue.value[0]}/${dateValue.value[1]}`).then((res) => { |
| | | |
| | | |
| | | console.log(res); |
| | | MessageShow(res); |
| | | if(res.code===200){ |
| | | pageTotal.value=res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | |
| | | |
| | | |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | |
| | | }) |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal=ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum=$ref(1) |
| | | let pageState = null |
| | | |
| | | //定义滚动条高度 |
| | | let scrollTop =ref(null) |
| | | let scrollHeight =ref(null) |
| | | let clientHeight =ref(null) |
| | | const scrollEvnt = (row) => { |
| | | // 内容高度 |
| | | scrollTop.value = row.$event.target.scrollTop |
| | | scrollHeight.value = row.$event.target.scrollHeight |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | |
| | | /*时间框快速选择*/ |
| | | const shortcuts = [ |
| | | { |
| | | text: '近一周', |
| | | value: () => { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 7) |
| | | return [start, end] |
| | | }, |
| | | }, |
| | | { |
| | | text: '近一个月', |
| | | value: () => { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 30) |
| | | return [start, end] |
| | | }, |
| | | }, |
| | | { |
| | | text: '近三个月', |
| | | value: () => { |
| | | const end = new Date() |
| | | const start = new Date() |
| | | start.setTime(start.getTime() - 3600 * 1000 * 24 * 90) |
| | | return [start, end] |
| | | }, |
| | | }, |
| | | ] |
| | | |
| | | const MessageShow = (content, type = 'success') => { |
| | | ElMessage({ |
| | | message: content, |
| | | type: type, |
| | | showClose: true, |
| | | }) |
| | | } |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | function filterChanged(column){ |
| | | /*gridOptions.loading=true |
| | | //筛选条件发生变化条件发生变化 |
| | | let value = column.datas[0]!=undefined?column.datas[0]:'' |
| | | value = value.trim() |
| | | //判断是否存在外键 |
| | | if (column.property.indexOf('.')>-1){ |
| | | const columnArr = column.property.split('.') |
| | | filterData.value[columnArr[0]] = { |
| | | [columnArr[1]]:value |
| | | } |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post("/product/1/100/"+productGlassTypeStore.GlassType,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | pageTotal.value=res.data.total |
| | | pageNum=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | })*/ |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <div id="head" > |
| | | <el-row :gutter="0"> |
| | | <el-date-picker |
| | | v-model="value" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | /> |
| | | |
| | | <el-button type="primary">查询</el-button> |
| | | <el-header height="auto" style="padding: 0;margin:0"> |
| | | <el-row :gutter="0" style="margin-bottom: 5px"> |
| | | <el-col :span="7"> |
| | | <el-date-picker |
| | | v-model="dateValue" |
| | | type="daterange" |
| | | unlink-panels |
| | | range-separator="-" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | :shortcuts="shortcuts" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | width:99% |
| | | /> |
| | | </el-col> |
| | | |
| | | <el-col :span="2"> |
| | | <el-button type="primary" @click="queryData()">查询</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-header> |
| | | |
| | | |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | @scroll ="scrollEvnt" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{ item.title + ': ' }}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | |
| | | |
| | | |
| | | </vxe-grid> |
| | | |
| | | |
| | | <el-dialog v-model="dialogFormVisible" title="返工编辑"> |
| | | <el-form :model="form"> |
| | | <el-form-item label="返工编号" :label-width="formLabelWidth"> |
| | | <el-input v-model="form.name" disabled autocomplete="off" style="width: 200px"/> |
| | | <el-input v-model="form.name" disabled autocomplete="off" style="width: 200px"/> |
| | | </el-form-item> |
| | | <el-form-item label="返工班组" :label-width="formLabelWidth"> |
| | | <el-select v-model="form.region" placeholder="班组一" style="width: 200px"> |
| | | <el-option label="班组一" value="shanghai" /> |
| | | <el-option label="班组二" value="beijing" /> |
| | | <el-option label="班组一" value="shanghai"/> |
| | | <el-option label="班组二" value="beijing"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | .main-div-customer { |
| | | width: 99%; |
| | | height: 100%; |
| | | height: 98%; |
| | | } |
| | | #head{ |
| | | width:40%; |
| | | |
| | | :deep(.el-col div) { |
| | | font-weight: bold; |
| | | width: 99%; |
| | | } |
| | | </style> |
New file |
| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | public class ReportWorkController { |
| | | } |
New file |
| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.service.pp.ReworkService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @RestController |
| | | @RequestMapping("/rework") |
| | | public class ReworkController { |
| | | |
| | | @Autowired |
| | | ReworkService reworkService; |
| | | |
| | | @PostMapping("/query/{pageNum}/{pageSize}/{startTime}/{endTime}") |
| | | public Result queryRework(@PathVariable Integer pageNum, @PathVariable Integer pageSize, |
| | | @PathVariable String startTime,@PathVariable String endTime |
| | | ){ |
| | | |
| | | return Result.seccess(reworkService.queryRework(pageNum,pageSize,startTime,endTime,null)); |
| | | } |
| | | } |
| | |
| | | package com.example.erp.entity.pp; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ReportingWorkDetail { |
| | | //自增ID |
| | | private Integer id; |
| | |
| | | package com.example.erp.entity.pp; |
| | | |
| | | import java.time.LocalDate; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | @Data |
| | | public class Rework { |
| | | //自增id |
| | | private Integer id; |
New file |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | |
| | | import com.example.erp.entity.pp.ReportingWorkDetail; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface ReportingWorkDetailMapper { |
| | | List<ReportingWorkDetail> getDetail(); |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | import com.example.erp.entity.pp.Rework; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface ReworkMapper { |
| | | |
| | | List<Rework> queryRework(@Param("offset") Integer offset,@Param("pageSize") Integer pageSiz,String startTime,String endTime,Rework rework); |
| | | } |
New file |
| | |
| | | package com.example.erp.service.pp; |
| | | |
| | | public class ReportWorkService { |
| | | } |
New file |
| | |
| | | package com.example.erp.service.pp; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.pp.Rework; |
| | | import com.example.erp.mapper.pp.ReworkMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | @Service |
| | | @DS("pp") |
| | | public class ReworkService { |
| | | @Autowired |
| | | ReworkMapper reworkMapper; |
| | | |
| | | /*查询返工数据*/ |
| | | public Map<String,Object> queryRework(Integer pageNum, Integer pageSize,String startTime,String endTime,Rework rework) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",reworkMapper.queryRework(offset,pageSize,startTime,endTime,rework)); |
| | | return map; |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.pp.ReportingWorkDetailMapper"> |
| | | <resultMap id="reworkAdd" type="com.example.erp.entity.pp.ReportingWorkDetail"> |
| | | |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | <!--获取补片数据--> |
| | | <select id="getDetail"> |
| | | select |
| | | * |
| | | from |
| | | reporting_work_detail |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <!--返工数据--> |
| | | |
| | | <mapper namespace="com.example.erp.mapper.pp.ReworkMapper"> |
| | | <resultMap id="reworkDataTitle" type="com.example.erp.entity.pp.Rework"> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | <!--获取返工数据--> |
| | | <select id="queryRework" resultMap="reworkDataTitle"> |
| | | select * from rework |
| | | <!--<where> |
| | | |
| | | create_time <![CDATA[>=]]> #{startTime} and create_time <![CDATA[<=]]> #{endTime}} |
| | | <!–返工编号–> |
| | | <if test="rework_id!=null and rework != ''"> |
| | | and rework_id = #{reworkId} |
| | | </if> |
| | | <!–流程卡号–> |
| | | <if test="process_id != null and process_id != ''"> |
| | | and process_id=#{processId} |
| | | </if> |
| | | <!–返工类型–> |
| | | <if test="rework_Type != null and rework_Type!=''"> |
| | | and rework_Type=#{rework_Type} |
| | | </if> |
| | | <!–返工原因–> |
| | | <if test="rework_Reason != null and rework_Reason!=''"> |
| | | and rework_Reason=#{rework_Reason} |
| | | </if> |
| | | <!–返工工序–> |
| | | <if test="rework_Processes != null and rework_Processes!=''"> |
| | | and rework_Processes=#{rework_Processes} |
| | | </if> |
| | | <!–返工数量–> |
| | | <if test="rework_Num != null and rework_Num!=''"> |
| | | and rework_Num=#{rework_Num} |
| | | </if> |
| | | <!–返工班组–> |
| | | <if test="rework_Team != null and rework_Team!=''"> |
| | | and rework_Team=#{rework_Team} |
| | | </if> |
| | | <!–审核人–> |
| | | <if test="reviewer != null and reviewer!=''"> |
| | | and reviewer=#{reviewer} |
| | | </if> |
| | | <!–审核状态–> |
| | | <if test="review_Status != null and review_Status!=''"> |
| | | and review_Status=#{review_Status} |
| | | </if> |
| | | <!–返工面积–> |
| | | <if test="rework_Area != null and rework_Area!=''"> |
| | | and rework_Area=#{rework_Area} |
| | | </if> |
| | | |
| | | </where>--> |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.pp.ReportingWorkDetailMapper"> |
| | | <resultMap id="reworkAdd" type="com.example.erp.entity.pp.ReportingWorkDetail"> |
| | | |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | <!--获取补片数据--> |
| | | <select id="getDetail"> |
| | | select |
| | | * |
| | | from |
| | | reporting_work_detail |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <!--返工数据--> |
| | | |
| | | <mapper namespace="com.example.erp.mapper.pp.ReworkMapper"> |
| | | <resultMap id="reworkDataTitle" type="com.example.erp.entity.pp.Rework"> |
| | | |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | <!--获取返工数据--> |
| | | <select id="queryRework" resultMap="reworkDataTitle"> |
| | | select * from rework |
| | | <!--<where> |
| | | |
| | | create_time <![CDATA[>=]]> #{startTime} and create_time <![CDATA[<=]]> #{endTime}} |
| | | <!–返工编号–> |
| | | <if test="rework_id!=null and rework != ''"> |
| | | and rework_id = #{reworkId} |
| | | </if> |
| | | <!–流程卡号–> |
| | | <if test="process_id != null and process_id != ''"> |
| | | and process_id=#{processId} |
| | | </if> |
| | | <!–返工类型–> |
| | | <if test="rework_Type != null and rework_Type!=''"> |
| | | and rework_Type=#{rework_Type} |
| | | </if> |
| | | <!–返工原因–> |
| | | <if test="rework_Reason != null and rework_Reason!=''"> |
| | | and rework_Reason=#{rework_Reason} |
| | | </if> |
| | | <!–返工工序–> |
| | | <if test="rework_Processes != null and rework_Processes!=''"> |
| | | and rework_Processes=#{rework_Processes} |
| | | </if> |
| | | <!–返工数量–> |
| | | <if test="rework_Num != null and rework_Num!=''"> |
| | | and rework_Num=#{rework_Num} |
| | | </if> |
| | | <!–返工班组–> |
| | | <if test="rework_Team != null and rework_Team!=''"> |
| | | and rework_Team=#{rework_Team} |
| | | </if> |
| | | <!–审核人–> |
| | | <if test="reviewer != null and reviewer!=''"> |
| | | and reviewer=#{reviewer} |
| | | </if> |
| | | <!–审核状态–> |
| | | <if test="review_Status != null and review_Status!=''"> |
| | | and review_Status=#{review_Status} |
| | | </if> |
| | | <!–返工面积–> |
| | | <if test="rework_Area != null and rework_Area!=''"> |
| | | and rework_Area=#{rework_Area} |
| | | </if> |
| | | |
| | | </where>--> |
| | | |
| | | </select> |
| | | |
| | | |
| | | </mapper> |