Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="dataSourceStorageLocal" created-in="IU-232.8660.185"> |
| | | <component name="dataSourceStorageLocal" created-in="IU-232.9559.62"> |
| | | <data-source name="@localhost [2]" uuid="165c5447-d19a-4aaf-af5f-cee92ae696c2"> |
| | | <database-info product="MySQL" version="8.0.22" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.22" exact-driver-version="8.0"> |
| | | <extra-name-characters>#@</extra-name-characters> |
| | |
| | | <database-info product="MySQL" version="8.0.19" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.19" exact-driver-version="8.0"> |
| | | <extra-name-characters>#@</extra-name-characters> |
| | | <identifier-quote-string>`</identifier-quote-string> |
| | | <jdbc-catalog-is-schema>true</jdbc-catalog-is-schema> |
| | | </database-info> |
| | | <case-sensitivity plain-identifiers="lower" quoted-identifiers="lower" /> |
| | | <secret-storage>master_key</secret-storage> |
| | |
| | | {code: 'print_lck', name: '打印流程卡',status:'primary' }, |
| | | {code: 'print_bq', name: '打印标签',status:'primary' } |
| | | ], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | import BasicTable from '@/components/basic/BasicTable.vue' |
| | | import {VXETable} from "vxe-table"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | |
| | | let router = useRouter() |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | | const getTableRow = (row,type) =>{ |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | case 'edit' : { |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: { id: row.id }}) |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'setType':{ |
| | | |
| | | case 'setType': { |
| | | alert('我接收到子组件传送的排版状态') |
| | | break |
| | | } |
| | |
| | | //定义表单值 |
| | | const form = reactive({ |
| | | date1: '', |
| | | orderId:'' |
| | | orderId: '' |
| | | }) |
| | | |
| | | |
| | | |
| | | //表尾求和 |
| | |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime()- 3600 * 1000 * 24 * 7) |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0,10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime()+3600 * 1000 * 24) |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime() + 3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0,10)//默认结束时间当前时间 |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | form.date1=getNowTime() |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | //第一次加载数据 |
| | |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | //禁用删除、保存按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | |
| | | |
| | | //点击时查询 |
| | | const getWorkOrder = () => { |
| | | let selectProcesses=value.value |
| | | let selectProcesses = value.value |
| | | let selectState = stateValue.value |
| | | let inputVal=form.orderId |
| | | if (inputVal== ''){ |
| | | inputVal=null |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | if (selectProcesses== ''){ |
| | | selectProcesses=null |
| | | if (selectProcesses == '') { |
| | | selectProcesses = null |
| | | } |
| | | if (inputVal== null && selectState==1){ |
| | | if (inputVal == null && selectState == 1) { |
| | | //根据时间查询未排产数据 |
| | | request.post(`/productionScheduling/selectLastScheduling/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | |
| | |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | //禁用删除、保存按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | else if(inputVal!=null && selectState==1){ |
| | | } else if (inputVal != null && selectState == 1) { |
| | | |
| | | //根据订单号查询未排产数据 |
| | | request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | //禁用删除、保存按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | else if(inputVal== null && selectState==2){ |
| | | } else if (inputVal == null && selectState == 2) { |
| | | //根据时间查询已排产数据 |
| | | request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | //启用删除、保存按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = false |
| | | gridOptions.toolbarConfig.buttons[1].disabled = false |
| | | //禁用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | else if(inputVal!= null && selectState==2){ |
| | | } else if (inputVal != null && selectState == 2) { |
| | | //根据订单号查询已排产数据 |
| | | request.post(`/productionScheduling/selectSchedulingNot/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | //启用删除、保存按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = false |
| | | gridOptions.toolbarConfig.buttons[1].disabled = false |
| | | //禁用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | 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}, |
| | | { type: 'checkbox',fixed:"left", title: '选择', width: 80 }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: 'scheduled_start_time' , width: 120,editRender: { name: 'input', attrs: { placeholder: '',type:'date' } }, title: '计划开始时间'}, |
| | | {field: 'plan_end_time' , width: 120,editRender: { name: 'input', attrs: { placeholder: '',type:'date' } }, title: '计划结束时间'}, |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'checkbox', fixed: "left", title: '选择', width: 80}, |
| | | {type: 'seq', fixed: "left", title: '自序', width: 50}, |
| | | { |
| | | field: 'scheduled_start_time', |
| | | width: 120, |
| | | editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}}, |
| | | title: '计划开始时间' |
| | | }, |
| | | { |
| | | field: 'plan_end_time', |
| | | width: 120, |
| | | editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}}, |
| | | title: '计划结束时间' |
| | | }, |
| | | // {field: '排产编号', title: '排产编号', width: 120 }, |
| | | {field: 'order_id', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 100 }, |
| | | {field: 'customer_name', title: '客户名称', width: 110,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'project', title: '项目名称', width: 100,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order_number', title: '序号', filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 70}, |
| | | {field: 'order_id', title: '销售单号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 100}, |
| | | {field: 'customer_name', title: '客户名称', width: 110, filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'project', title: '项目名称', width: 100, filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'order_number', title: '序号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, width: 70}, |
| | | |
| | | {field: 'width', title: '宽', width: 60}, |
| | | {field: 'height', title: '高', width: 60}, |
| | | {field: 'quantity', title: '订单数量', width: 70}, |
| | | {field: 'area', title: '订单面积', width: 90}, |
| | | {field: 'scheduling_quantity' , width: 120,editRender: { name: 'input', attrs: { placeholder: '' } }, title: '排产数量', sortable: true}, |
| | | {field: 'pendingProductionQuantity', title: '待排产数量', width: 120}, |
| | | {field: 'pendingProductionArea', title: '待排产面积', width: 120}, |
| | | {field: 'productionScheduledQuantity', title: '已排产数量', width: 120}, |
| | | {field: 'productionScheduledArea', title: '已排产面积', width: 120}, |
| | | {field: 'review_status', title: '审核状态', width: 140}, |
| | | {field: 'reviewer', title: '审核人', width: 140}, |
| | | {field: 'product_name', title: '产品名称', width: 140}, |
| | | {field: 'shape', title: '形状', width: 80}, |
| | | {field: 'notes', title: '备注', editRender: { name: 'input', attrs: { placeholder: '' } }, width: 120}, |
| | | {field: 'width', title: '宽', width: 60}, |
| | | {field: 'height', title: '高', width: 60}, |
| | | {field: 'quantity', title: '订单数量', width: 70}, |
| | | {field: 'area', title: '订单面积', width: 90}, |
| | | { |
| | | field: 'scheduling_quantity', |
| | | width: 120, |
| | | editRender: {name: 'input', attrs: {placeholder: ''}}, |
| | | title: '排产数量', |
| | | sortable: true |
| | | }, |
| | | {field: 'pendingProductionQuantity', title: '待排产数量', width: 120}, |
| | | {field: 'pendingProductionArea', title: '待排产面积', width: 120}, |
| | | {field: 'productionScheduledQuantity', title: '已排产数量', width: 120}, |
| | | {field: 'productionScheduledArea', title: '已排产面积', width: 120}, |
| | | {field: 'review_status', title: '审核状态', width: 140}, |
| | | {field: 'reviewer', title: '审核人', width: 140}, |
| | | {field: 'product_name', title: '产品名称', width: 140}, |
| | | {field: 'shape', title: '形状', width: 80}, |
| | | {field: 'notes', title: '备注', editRender: {name: 'input', attrs: {placeholder: ''}}, width: 120}, |
| | | {field: 'scheduling_id', title: '排产编号',width: 120}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'delete', name: '删除',status:'primary' }, |
| | | {code: 'review', name: '审核',status:'primary' }, |
| | | {code: 'save', name: '排产',status:'primary' ,icon:'vxe-icon-save'}, |
| | | {code: 'delete', name: '删除', status: 'primary'}, |
| | | {code: 'review', name: '审核', status: 'primary'}, |
| | | {code: 'save', name: '排产', status: 'primary', icon: 'vxe-icon-save'}, |
| | | ], |
| | | import: false, |
| | | // export: true, |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | |
| | | ],//table body实际数据 |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['数量','面积','排产数量','已排产数量','已排产面积','未排产数量','未排产面积'] |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | // footerMethod({columns, data}) {//页脚函数 |
| | | // let footList = ['数量', '面积', '排产数量', '已排产数量', '已排产面积', '未排产数量', '未排产面积'] |
| | | // return [ |
| | | // columns.map((column, columnIndex) => { |
| | | // if (columnIndex === 0) { |
| | | // return '合计:' |
| | | // } |
| | | // if (footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | // return '' |
| | | // }) |
| | | // ] |
| | | // } |
| | | |
| | | }) |
| | | |
| | | //删除 |
| | | |
| | | |
| | | const gridEvents = { |
| | | toolbarButtonClick({code}) { |
| | | async toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | if (selectRecords.length==0){ |
| | | ElMessage.success("请勾选排产数据") |
| | | if (selectRecords.length == 0) { |
| | | ElMessage.warning("请勾选排产数据") |
| | | return; |
| | | } |
| | | for (let i = 0; i < selectRecords.length; i++){ |
| | | let start= selectRecords[i].scheduled_start_time |
| | | let end= selectRecords[i].plan_end_time |
| | | let number=selectRecords[i].scheduling_quantity |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | let start = selectRecords[i].scheduled_start_time |
| | | let end = selectRecords[i].plan_end_time |
| | | let number = selectRecords[i].scheduling_quantity |
| | | //计划开始、结束时间,排产数量不能为空 |
| | | if (start==null || end==null || number==null){ |
| | | ElMessage.success("请填入对应的值再进行保存") |
| | | if (start == null || end == null || number == null) { |
| | | ElMessage.warning("请填入对应的值再进行保存") |
| | | return; |
| | | } |
| | | } |
| | | let selectProcesses=value.value |
| | | if (selectProcesses==null || selectProcesses==""){ |
| | | ElMessage.success("请选择排产工序") |
| | | let selectProcesses = value.value |
| | | if (selectProcesses == null || selectProcesses == "") { |
| | | ElMessage.warning("请选择排产工序") |
| | | return; |
| | | } |
| | | |
| | | let schedulingData = ref({ |
| | | scheduling: selectRecords, |
| | | processes:selectProcesses,//工序 |
| | | userName:username//审核人 |
| | | processes: selectProcesses,//工序 |
| | | userName: username//审核人 |
| | | }) |
| | | console.log(schedulingData.value) |
| | | //保存排产数据 |
| | | request.post("/productionScheduling/addScheduling", schedulingData.value).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | |
| | | } |
| | | }) |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | case 'delete': { |
| | | const $table = xGrid.value |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | if ($table) { |
| | | if (selectRecords.length == 0) { |
| | | ElMessage.warning("请勾选排产数据") |
| | | return; |
| | | } |
| | | const type = await VXETable.modal.confirm('您确定要删除该数据?') |
| | | if (type === 'confirm') { |
| | | //保存排产数据 |
| | | request.post("/productionScheduling/addScheduling").then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("保存成功") |
| | | location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | | |
| | | } |
| | | |
| | | const determineNum = () => { |
| | | const $grid = xGrid.value |
| | | const table = $grid.getTableData().fullData |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | table.forEach((selectRecords) => { |
| | | if (selectRecords.scheduling_quantity > selectRecords.pendingProductionQuantity) { |
| | | ElMessage.warning("排产数量不能大于待排产数量") |
| | | //禁用保存按钮 |
| | | //gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | } |
| | | |
| | | |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | |
| | | <el-row :gutter="0"> |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | type="daterange" |
| | | format="YYYY/MM/DD" |
| | | value-format="YYYY-MM-DD" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | :default-time="defaultTime" |
| | | end-placeholder="结束时间" |
| | | format="YYYY/MM/DD" |
| | | start-placeholder="开始时间" |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD" |
| | | |
| | | /> |
| | | |
| | | <el-input placeholder="销售单号" v-model="form.orderId" style="width: 110px"></el-input> |
| | | <el-input v-model="form.orderId" placeholder="销售单号" clearable style="width: 110px"></el-input> |
| | | |
| | | <el-select v-model="value" class="m-2" placeholder="工序" style="width: 90px;"> |
| | | <el-select v-model="value" class="m-2" placeholder="工序" clearable style="width: 90px;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | |
| | | </el-select> |
| | | |
| | | <el-button |
| | | @click="getWorkOrder" |
| | | id="select" |
| | | type="primary" :icon="Search">查询 |
| | | :icon="Search" |
| | | type="primary" @click="getWorkOrder">查询 |
| | | </el-button> |
| | | </el-row> |
| | | |
| | | </div> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | max-height="100%" |
| | | height="100%" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @filter-change="filterChanged" |
| | | @checkbox-change="determineNum" |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | .main-div-customer { |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | |
| | | #selectForm { |
| | | width: 70%; |
| | | height: 6%; |
| | | text-align: center; |
| | | } |
| | | </style> |
| | |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | import {ElMessage} from "element-plus"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {indexOf} from "xe-utils"; |
| | | |
| | | let brokenVisible = ref(false) |
| | | const xGrid = ref() |
| | | let router = useRouter() |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' : { |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}}) |
| | | break |
| | | } |
| | | case 'delete': { |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'setType': { |
| | | alert('我接收到子组件传送的排版状态') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | //定义表头数据 |
| | | const titleUploadData = ref({ |
| | |
| | | // {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | { |
| | | field: 'order_number', |
| | | width: 90, |
| | | title: '序号', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | |
| | | }, |
| | | { |
| | | field: 'glass_child', |
| | | width: 120, |
| | | title: '单片名称', |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | |
| | | }, |
| | | { |
| | | field: 'technology_number', |
| | | width: 90, |
| | | title: '标记', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | |
| | | }, |
| | | { |
| | | field: 'glass_address', |
| | | width: 100, |
| | | title: '片标记', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | |
| | | }, |
| | | { |
| | | field: 'quantity_card', |
| | | width: 110, |
| | | title: '流程卡数量', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | |
| | | }, |
| | | { |
| | | field: 'child_width', |
| | | width: 70, |
| | | title: '宽', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | |
| | | }, |
| | | { |
| | | field: 'child_height', |
| | | width: 70, |
| | | title: '高', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | |
| | | }, |
| | | { |
| | | field: 'shape', |
| | | width: 70, |
| | | title: '形状', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | showOverflow: "ellipsis", |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'quantity', width: 120, title: '上工完工数量',}, |
| | | {field: 'quantity', title: '上工完工数量',}, |
| | | { |
| | | field: 'completedQuantity', width: 100, title: '完工数量', |
| | | field: 'completedQuantity', title: '完工数量', |
| | | editRender: { |
| | | name: 'input', |
| | | attrs: {placeholder: ''}, |
| | |
| | | |
| | | }, |
| | | { |
| | | field: 'breakageNumber', width: 100, title: '次破数量', |
| | | editRender: { |
| | | name: 'input', |
| | | attrs: {placeholder: ''} |
| | | } |
| | | }, |
| | | {field: 'available', width: 80, title: '可利用', editRender: {name: 'input', attrs: {placeholder: ''}}}, |
| | | {field: 'returnProcess', width: 100, title: '退回工序', editRender: {name: 'input', attrs: {placeholder: ''}}}, |
| | | { |
| | | field: 'reasonType', width: 100, title: '次破类型', |
| | | editRender: {name: 'input', attrs: {placeholder: '', type: 'selected'}} |
| | | }, |
| | | { |
| | | field: 'reasonDamage', width: 100, title: '次破原因', |
| | | editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | }, |
| | | { |
| | | field: 'responsibleProcess', width: 100, title: '责任工序', |
| | | editRender: {}, |
| | | slots: {default: 'reportingWordSort_default', edit: 'reportingWordSort'} |
| | | //editRender: {name: 'input', attrs: {placeholder: '',type: 'selected'}}, |
| | | field: 'breakageNumber', title: '次破数量', |
| | | |
| | | }, |
| | | { |
| | | field: 'responsibleEquipment', |
| | | width: 100, |
| | | title: '责任设备', |
| | | editRender: {}, |
| | | slots: {default: 'reportingDeviceSort_default', edit: 'reportingDeviceSort'} |
| | | // editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | }, |
| | | |
| | | { |
| | | field: 'responsibleTeam', width: 100, title: '责任班组', |
| | | editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | }, |
| | | { |
| | | field: 'responsibilityPersonnel', |
| | | width: 100, |
| | | title: '责任人员', |
| | | editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | |
| | | }, |
| | | // {field: 'available', width: 80, title: '可利用', editRender: {name: 'input', attrs: {placeholder: ''}}}, |
| | | // {field: 'returnProcess', width: 100, title: '退回工序', editRender: {name: 'input', attrs: {placeholder: ''}}}, |
| | | // { |
| | | // field: 'reasonType', width: 100, title: '次破类型', |
| | | // editRender: {name: 'input', attrs: {placeholder: '', type: 'selected'}} |
| | | // }, |
| | | // { |
| | | // field: 'reasonDamage', width: 100, title: '次破原因', |
| | | // editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | // }, |
| | | // { |
| | | // field: 'responsibleProcess', width: 100, title: '责任工序', |
| | | // editRender: {}, |
| | | // slots: {default: 'reportingWordSort_default', edit: 'reportingWordSort'} |
| | | // //editRender: {name: 'input', attrs: {placeholder: '',type: 'selected'}}, |
| | | // |
| | | // }, |
| | | // { |
| | | // field: 'responsibleEquipment', |
| | | // width: 100, |
| | | // title: '责任设备', |
| | | // editRender: {}, |
| | | // slots: {default: 'reportingDeviceSort_default', edit: 'reportingDeviceSort'} |
| | | // // editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | // }, |
| | | // |
| | | // { |
| | | // field: 'responsibleTeam', width: 100, title: '责任班组', |
| | | // editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | // }, |
| | | // { |
| | | // field: 'responsibilityPersonnel', |
| | | // width: 100, |
| | | // title: '责任人员', |
| | | // editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | // |
| | | // }, |
| | | {field: 'completed', width: 90, title: '已完工',}, |
| | | {field: 'onceBroken', width: 90, title: '已次破',}, |
| | | |
| | |
| | | }, |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = ['', '', '', '', ''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | // footerMethod({columns, data}) {//页脚函数 |
| | | // let footList = ['', '', '', '', ''] |
| | | // return [ |
| | | // columns.map((column, columnIndex) => { |
| | | // if (columnIndex === 0) { |
| | | // return '合计:' |
| | | // } |
| | | // if (footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | // return '' |
| | | // }) |
| | | // ] |
| | | // } |
| | | |
| | | }) |
| | | |
| | | let brokenRow = ref() |
| | | const gridEvents = { |
| | | cellDblclick (params) {//表格内容双击打开产品界面 |
| | | const { row } = params |
| | | brokenRow = row |
| | | console.log(row) |
| | | //brokenGrid.value.reload() |
| | | //brokenVisible.value = true |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | const brokenGrid =ref() |
| | | const brokenGridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY: {enabled: true},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns: [ |
| | | // {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | { |
| | | field: 'order_number', |
| | | title: '序号', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | |
| | | { |
| | | field: 'breakageNumber', title: '次破数量', |
| | | |
| | | }, |
| | | {field: 'available', title: '可利用', editRender: {name: 'input', attrs: {placeholder: ''}}}, |
| | | {field: 'returnProcess', title: '退回工序', editRender: {name: 'input', attrs: {placeholder: ''}}}, |
| | | { |
| | | field: 'reasonType', title: '次破类型', |
| | | editRender: {name: 'input', attrs: {placeholder: '', type: 'selected'}} |
| | | }, |
| | | { |
| | | field: 'reasonDamage', title: '次破原因', |
| | | editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | }, |
| | | { |
| | | field: 'responsibleProcess', title: '责任工序', |
| | | editRender: {}, |
| | | slots: {default: 'reportingWordSort_default', edit: 'reportingWordSort'} |
| | | //editRender: {name: 'input', attrs: {placeholder: '',type: 'selected'}}, |
| | | |
| | | }, |
| | | { |
| | | field: 'responsibleEquipment', |
| | | title: '责任设备', |
| | | editRender: {}, |
| | | slots: {default: 'reportingDeviceSort_default', edit: 'reportingDeviceSort'} |
| | | // editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | }, |
| | | |
| | | { |
| | | field: 'responsibleTeam', title: '责任班组', |
| | | editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | }, |
| | | { |
| | | field: 'responsibilityPersonnel', |
| | | title: '责任人员', |
| | | editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | |
| | | }, |
| | | |
| | | ], |
| | | //表单验证 |
| | | editRules: {}, |
| | | toolbarConfig: {//表头按钮 |
| | | buttons: [ |
| | | {code: 'print_lck', name: '添加', status: 'primary', icon: 'vxe-icon-save'}, |
| | | ], |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | }) |
| | | |
| | | |
| | | //第一次加载数据 |
| | | |
| | |
| | | max-height="100%" |
| | | size="small" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @filter-change="filterChanged" |
| | | @edit-closed="verifyNum" |
| | | |
| | |
| | | |
| | | |
| | | </vxe-grid> |
| | | <el-dialog v-model="brokenVisible" title="破损列表" style="width: 80%;height:75% "> |
| | | <vxe-grid ref="brokenGrid" v-bind="brokenGridOptions"> |
| | | |
| | | </vxe-grid> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | buttons: [ |
| | | {code: 'print_lck', name: '审核通过',status:'primary' }, |
| | | ], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | buttons: [ |
| | | {code: 'saveWorkOrder', name: '保存', status: 'primary', icon: 'vxe-icon-save'}, |
| | | ], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | import {ElMessage} from "element-plus"; |
| | | import {useRouter} from "vue-router"; |
| | | import GlassType from '@/components/basic/product/GlassType.vue' |
| | | |
| | | const router = useRouter() |
| | | let indexFlag=$ref(1) |
| | | function changeRouter(index){ |
| | |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/processCard/SelectPrintFlowCard' }" style="display: none">打印</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | </div> |
| | |
| | | <vxe-grid |
| | | @filter-change="filterChanged" |
| | | @cell-dblclick="cellClickEvent" |
| | | style="max-height: 95%" |
| | | max-height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined && index>9"> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | </li> |
| | |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/product/createProduct' }">创建</el-breadcrumb-item> |
| | | <!-- <el-breadcrumb-item :to="{ path: '/main/product/test' }">测试</el-breadcrumb-item>--> |
| | | <!-- <el-breadcrumb-item :to="{ path: '/main/product/testSort11' }">测试</el-breadcrumb-item>--> |
| | | <el-breadcrumb-item :to="{ path: '/main/product/test1' }">测试</el-breadcrumb-item> |
| | | <el-breadcrumb-item v-show="false" :to="{ path: '/main/product/test1' }">测试</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | |
| | | </div> |
| | |
| | | data:null,//表格数据 |
| | | toolbarConfig: { |
| | | buttons: [], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | |
| | | } |
| | | |
| | | //点击查询排版数据 |
| | | //点击查询排版数据(带订单号查询) |
| | | @PostMapping ("/selectSchedulingNot/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}") |
| | | public Result SelectSchedulingNot( |
| | | @PathVariable String selectTime1, |
New file |
| | |
| | | package com.example.erp.entity.pp; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | | |
| | | |
| | | @Data |
| | | public class DamageDetails { |
| | | @TableId(type = IdType.AUTO) |
| | | //自增ID |
| | | private Integer id; |
| | | //报工编号 |
| | | private String reportingWorkId; |
| | | //流程卡号 |
| | | private String processId; |
| | | //产品序号 |
| | | private String orderNumber; |
| | | //工艺确认序号 |
| | | private String technologyNumber; |
| | | //次破数量 |
| | | private Integer breakageQuantity; |
| | | //次破原因 |
| | | private String breakageReason; |
| | | //类型 |
| | | private String breakageType; |
| | | //可利用 |
| | | private Integer available; |
| | | //退回工序 |
| | | private String returnProcess; |
| | | //责任工序 |
| | | private String responsibleProcess; |
| | | //责任人员 |
| | | private String responsiblePersonnel; |
| | | //责任班组 |
| | | private String responsibleTeam; |
| | | //责任设备 |
| | | private String responsibleEquipment; |
| | | //质检员 |
| | | private String qualityInspector; |
| | | //补片状态 |
| | | private Integer patchStatus; |
| | | //质检状态 |
| | | private Integer qualityInsStatus; |
| | | } |
| | |
| | | /*返工部分*/ |
| | | //返工班组 |
| | | private String reworkTeam; |
| | | //待返工数量 |
| | | private Integer waitReworkQuantity; |
| | | //返工审核状态 |
| | | private Integer reviewerState; |
| | | //返工审核人 |
| | |
| | | //带时间查询 |
| | | public Map<String, Object> SelectSchedulingSv(String selectTime1, String selectTime2, String orderId,String processes, Integer state, ProductionScheduling productionScheduling ) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(orderId.equals("null")){ |
| | | orderId=""; |
| | | } |
| | | if (processes.equals("null")){ |
| | | |
| | | processes=""; |
| | | } |
| | | |
| | | if (state==2){//已排产 |
| | | map.put("data", productionSchedulingMapper.SelectOkSchedulingMp(selectTime1, selectTime2,orderId,processes, productionScheduling)); |
| | |
| | | <result column="processes" property="processes"/> |
| | | <result column="scheduling_quantity" property="schedulingQuantity"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="scheduling_id" property="schedulingId"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="project" property="project"/> |
| | |
| | | od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | ps.scheduling_quantity, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | # (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | # round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | IF(ps.review_status=0,"未审核","已审核") as review_status, |
| | | ps.reviewer, |
| | | od.product_name,od.shape |
| | | od.product_name,od.shape,ps.scheduling_id |
| | | from sd.order_detail as od |
| | | left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where ps.scheduling_id IS NOT NULL |
| | | and od.create_time between #{selectTime1} and #{selectTime2} |
| | | <if test="processes!=null and processes!=''"> |
| | | and ps.processes regexp #{processes} |
| | | </if> |
| | | |
| | | and position(#{processes} in ps.processes) |
| | | and position(#{orderId} in ps.order_id) |
| | | |
| | | </select> |
| | | |
| | |
| | | od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | ps.scheduling_quantity, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | # (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | # round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | IF(ps.review_status=0,"未审核","已审核") as review_status, |
| | | ps.reviewer, |
| | | od.product_name,od.shape |
| | | od.product_name,od.shape,ps.scheduling_id |
| | | from sd.order_detail as od |
| | | left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where ps.scheduling_id IS NOT NULL |
| | | and od.order_id regexp #{orderId} |
| | | |
| | | <if test="processes!=null and processes!=''"> |
| | | and ps.processes regexp #{processes} |
| | | </if> |
| | | where (ps.scheduling_id IS NOT NULL ) |
| | | and position(#{processes} in ps.processes) |
| | | and position(#{orderId} in ps.order_id) |
| | | |
| | | </select> |
| | | <!-- 查询未排产数据--> |
| | |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where isnull(ps.scheduling_id) and od.create_time between #{selectTime1} and #{selectTime2} |
| | | <if test="orderId!=null and orderId!=''"> |
| | | and od.order_id regexp #{orderId} |
| | | where od.quantity-IFNULL(ps.scheduling_quantity,0)>0 and od.create_time between #{selectTime1} and #{selectTime2} |
| | | |
| | | </if> |
| | | and position(#{orderId} in ps.order_id) |
| | | group by od.order_id,od.order_number |
| | | </select> |
| | | <!-- 首次查询排产数据--> |
| | |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where od.create_time between #{selectTime1} and #{selectTime2} |
| | | where od.create_time between #{selectTime1} and #{selectTime2} and od.quantity-IFNULL(ps.scheduling_quantity,0)>0 |
| | | </select> |
| | | |
| | | <select id="selectMaxId"> |
| | |
| | | </select> |
| | | |
| | | <select id="SelectWorkBasicDeviceMp"> |
| | | select * |
| | | from basic_data_produce as a |
| | | where a.basic_category = #{process} |
| | | and a.basic_type = '设备' |
| | | SELECT bdp.id,bdp.basic_type,bdp.basic_name, bd.basic_name as basic_category FROM sd.basic_data as bd left join `basic_data_produce` as bdp |
| | | on bd.id=bdp.basic_category |
| | | where bd.basic_category="process" and bdp.basic_type="device" and bd.basic_name = #{process} |
| | | </select> |
| | | |
| | | <select id="SelectWorkBasicTeamsMp"> |
| | | select * |
| | | from basic_data_produce as a |
| | | where a.basic_category = #{process} |
| | | and a.basic_type = '班组' |
| | | SELECT bdp.id,bdp.basic_type,bdp.basic_name, bd.basic_name as basic_category FROM sd.basic_data as bd left join `basic_data_produce` as bdp |
| | | on bd.id=bdp.basic_category |
| | | where bd.basic_category="process" and bdp.basic_type="teamsgroups" and bd.basic_name = #{process} |
| | | </select> |
| | | |
| | | <!-- 查询流程卡工艺流程--> |
| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | fc.quantity - IFNULL(fc.number_patches,0)-IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.breakage_quantity-rwd.rework_quantity),0) |
| | | fc.quantity - IFNULL(fc.number_patches,0)-IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.wait_rework_quantity),0) |
| | | as quantity |
| | | FROM |
| | | sd.order_detail AS od |
| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | reportingwork_num -IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.breakage_quantity-rwd.rework_quantity),0) as quantity |
| | | reportingwork_num -IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.wait_rework_quantity),0) as quantity |
| | | FROM sd.order_detail as od |
| | | left join sd.order_glass_detail as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | |
| | | <result column="processes" property="processes"/> |
| | | <result column="scheduling_quantity" property="schedulingQuantity"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="scheduling_id" property="schedulingId"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="project" property="project"/> |
| | |
| | | od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | ps.scheduling_quantity, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | # (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | # round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | IF(ps.review_status=0,"未审核","已审核") as review_status, |
| | | ps.reviewer, |
| | | od.product_name,od.shape |
| | | od.product_name,od.shape,ps.scheduling_id |
| | | from sd.order_detail as od |
| | | left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where ps.scheduling_id IS NOT NULL |
| | | and od.create_time between #{selectTime1} and #{selectTime2} |
| | | <if test="processes!=null and processes!=''"> |
| | | and ps.processes regexp #{processes} |
| | | </if> |
| | | |
| | | and position(#{processes} in ps.processes) |
| | | and position(#{orderId} in ps.order_id) |
| | | |
| | | </select> |
| | | |
| | |
| | | od.order_id,o.customer_name,o.project,od.order_number,od.width,od.height,od.quantity, |
| | | round(od.width*od.height*od.quantity/1000000,2) as area, |
| | | ps.scheduling_quantity, |
| | | (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | # (od.quantity-IFNULL(ps.scheduling_quantity,0)) as pendingProductionQuantity, |
| | | # round(od.width*od.height*(od.quantity-IFNULL(ps.scheduling_quantity,0))/1000000,2) as pendingProductionArea, |
| | | IFNULL(ps.scheduling_quantity,0) as productionScheduledQuantity, |
| | | round(od.width*od.height*(IFNULL(ps.scheduling_quantity,0))/1000000,2) as productionScheduledArea, |
| | | IF(ps.review_status=0,"未审核","已审核") as review_status, |
| | | ps.reviewer, |
| | | od.product_name,od.shape |
| | | od.product_name,od.shape,ps.scheduling_id |
| | | from sd.order_detail as od |
| | | left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where ps.scheduling_id IS NOT NULL |
| | | and od.order_id regexp #{orderId} |
| | | |
| | | <if test="processes!=null and processes!=''"> |
| | | and ps.processes regexp #{processes} |
| | | </if> |
| | | where (ps.scheduling_id IS NOT NULL ) |
| | | and position(#{processes} in ps.processes) |
| | | and position(#{orderId} in ps.order_id) |
| | | |
| | | </select> |
| | | <!-- 查询未排产数据--> |
| | |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where isnull(ps.scheduling_id) and od.create_time between #{selectTime1} and #{selectTime2} |
| | | <if test="orderId!=null and orderId!=''"> |
| | | and od.order_id regexp #{orderId} |
| | | where od.quantity-IFNULL(ps.scheduling_quantity,0)>0 and od.create_time between #{selectTime1} and #{selectTime2} |
| | | |
| | | </if> |
| | | and position(#{orderId} in ps.order_id) |
| | | group by od.order_id,od.order_number |
| | | </select> |
| | | <!-- 首次查询排产数据--> |
| | |
| | | od.product_name,od.shape |
| | | from sd.order_detail as od left join sd.order as o on od.order_id=o.order_id |
| | | left join production_scheduling as ps on ps.order_id=od.order_id and ps.order_number=od.order_number |
| | | where od.create_time between #{selectTime1} and #{selectTime2} |
| | | where od.create_time between #{selectTime1} and #{selectTime2} and od.quantity-IFNULL(ps.scheduling_quantity,0)>0 |
| | | </select> |
| | | |
| | | <select id="selectMaxId"> |
| | |
| | | </select> |
| | | |
| | | <select id="SelectWorkBasicDeviceMp"> |
| | | select * |
| | | from basic_data_produce as a |
| | | where a.basic_category = #{process} |
| | | and a.basic_type = '设备' |
| | | SELECT bdp.id,bdp.basic_type,bdp.basic_name, bd.basic_name as basic_category FROM sd.basic_data as bd left join `basic_data_produce` as bdp |
| | | on bd.id=bdp.basic_category |
| | | where bd.basic_category="process" and bdp.basic_type="device" and bd.basic_name = #{process} |
| | | </select> |
| | | |
| | | <select id="SelectWorkBasicTeamsMp"> |
| | | select * |
| | | from basic_data_produce as a |
| | | where a.basic_category = #{process} |
| | | and a.basic_type = '班组' |
| | | SELECT bdp.id,bdp.basic_type,bdp.basic_name, bd.basic_name as basic_category FROM sd.basic_data as bd left join `basic_data_produce` as bdp |
| | | on bd.id=bdp.basic_category |
| | | where bd.basic_category="process" and bdp.basic_type="teamsgroups" and bd.basic_name = #{process} |
| | | </select> |
| | | |
| | | <!-- 查询流程卡工艺流程--> |
| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | fc.quantity - IFNULL(fc.number_patches,0)-IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.breakage_quantity-rwd.rework_quantity),0) |
| | | fc.quantity - IFNULL(fc.number_patches,0)-IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.wait_rework_quantity),0) |
| | | as quantity |
| | | FROM |
| | | sd.order_detail AS od |
| | |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.shape, |
| | | reportingwork_num -IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.breakage_quantity-rwd.rework_quantity),0) as quantity |
| | | reportingwork_num -IFNULL(rwd.completed_quantity,0)-IFNULL(rwd.breakage_quantity,0)-IFNULL((rwd.wait_rework_quantity),0) as quantity |
| | | FROM sd.order_detail as od |
| | | left join sd.order_glass_detail as ogd |
| | | on od.order_id = ogd.order_id and od.order_number = ogd.order_number |