Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | {field: 'width', |
| | | width: 100, |
| | | title: t('order.width'), |
| | | editRender: { name: 'input' }, |
| | | sortable: true |
| | | }, |
| | | { |
| | | field: 'height', |
| | | width: 100, |
| | | title: t('order.height'), |
| | | editRender: { name: 'input' }, |
| | | sortable: true |
| | | }, |
| | | { |
| | | field: 'quantity', |
| | | width: 150, |
| | | title: t('order.quantity'), |
| | | editRender: { name: 'input' }, |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | |
| | | body: { |
| | | options: [ |
| | | [ |
| | | {code: 'setAmount', name: '设置统一磨量',}, |
| | | {code: 'setAmount', name: '设置统一磨量',prefixIcon:'vxe-icon-edit'}, |
| | | {code: 'addRow', name: '添加临时小片', prefixIcon: 'vxe-icon-add', visible: true, disabled: false}, |
| | | {code: 'displayProcessCard', name: '显示流程卡',}, |
| | | {code: 'hideProcessCard', name: '隐藏流程卡',}, |
| | | {code: 'setShape', name: '设置图形',}, |
| | | {code: 'Export', name: '数据导出', prefixIcon: 'vxe-icon-download', visible: true, disabled: false}, |
| | | {code: 'safeDXF', name: '图形另存为DXF',}, |
| | | {code: 'exportOPTIMA', name: '导出数据到OPTIMA',}, |
| | | {code: 'copyChecked', name: t('basicData.selectSame'), prefixIcon: 'vxe-icon-copy', visible: true, disabled: false }, |
| | | {code: 'copyAll', name: t('basicData.sameAfterwards'), prefixIcon: 'vxe-icon-feedback', visible: true, disabled: false }, |
| | | { |
| | | code: 'copyChecked', |
| | | name: t('basicData.selectSame'), |
| | | prefixIcon: 'vxe-icon-copy', |
| | | visible: true, |
| | | disabled: false |
| | | }, |
| | | { |
| | | code: 'copyAll', |
| | | name: t('basicData.sameAfterwards'), |
| | | prefixIcon: 'vxe-icon-feedback', |
| | | visible: true, |
| | | disabled: false |
| | | }, |
| | | ], |
| | | [] |
| | | ] |
| | |
| | | } |
| | | }, |
| | | { |
| | | code: 'Export', // 导出文件操作的配置 |
| | | successMsg: '文件导出成功!', |
| | | code: 'addRow', |
| | | successMsg: '已添加', |
| | | gridRef: xGrid, |
| | | requiresRow: false, |
| | | addNewRow: async () => { |
| | | // 获取当前的磨量配置 |
| | | let currentGrindConfig = null; |
| | | try { |
| | | const res = await request.post(`/glassOptimize/getConfiguration/磨量/${username}`); |
| | | if (res.code == "200" && res.data.data && res.data.data.length > 0) { |
| | | const rawData = res.data.data[0]; |
| | | currentGrindConfig = {}; |
| | | for (const key in rawData) { |
| | | if (typeof rawData[key] === 'string') { |
| | | currentGrindConfig[key] = rawData[key].replace(/^\"|\"$/g, ''); |
| | | } else { |
| | | currentGrindConfig[key] = rawData[key]; |
| | | } |
| | | } |
| | | } |
| | | } catch (error) { |
| | | console.warn('获取磨量配置失败:', error); |
| | | } |
| | | |
| | | // 根据磨量配置设置默认值 |
| | | let defaultLongGrind1 = 0; |
| | | let defaultLongGrind2 = 0; |
| | | let defaultShortGrind1 = 0; |
| | | let defaultShortGrind2 = 0; |
| | | |
| | | if (currentGrindConfig) { |
| | | defaultLongGrind1 = parseFloat(currentGrindConfig.leftEdge) || 0; |
| | | defaultLongGrind2 = parseFloat(currentGrindConfig.rightEdge) || 0; |
| | | defaultShortGrind1 = parseFloat(currentGrindConfig.upEdge) || 0; |
| | | defaultShortGrind2 = parseFloat(currentGrindConfig.downEdge) || 0; |
| | | } |
| | | |
| | | // 创建新行数据,将 width、height、quantity 设置为数值类型 |
| | | const newRow = { |
| | | order_number: 0, |
| | | width: 0, |
| | | height: 0, |
| | | quantity: 0, |
| | | longGrind1: defaultLongGrind1, |
| | | longGrind2: defaultLongGrind2, |
| | | shortGrind1: defaultShortGrind1, |
| | | shortGrind2: defaultShortGrind2, |
| | | shape: '', |
| | | process_id: '', |
| | | productName: '', |
| | | price: 0, |
| | | remark: '', |
| | | buildingNumber: '', |
| | | perimeter: 0, |
| | | area: 0, |
| | | rackNo: 1, |
| | | layer: 1, |
| | | glass_child: '', |
| | | markIcon: '', |
| | | processId: '', |
| | | totalLayer: 0, |
| | | patchState: 0, |
| | | heatLayoutId: 0, |
| | | process: '', |
| | | orderNo: '', |
| | | customerName: '', |
| | | processingNote: '', |
| | | projectName: '' |
| | | }; |
| | | |
| | | // 将新行添加到表格数据中 |
| | | const currentData = gridOptions.data || []; |
| | | const updatedData = [...currentData, newRow]; |
| | | gridOptions.data = updatedData; |
| | | xGrid.value.loadData(updatedData); |
| | | |
| | | // 获取新添加行的索引 |
| | | const newIndex = updatedData.length - 1; |
| | | |
| | | // 选中并编辑新行 |
| | | await nextTick(); |
| | | xGrid.value.setActiveRow(newRow); |
| | | } |
| | | }, |
| | | { |
| | | code: 'safeDXF', |
| | |
| | | if (config.code === 'Export') { |
| | | config.gridRef.value.exportData(); |
| | | ElMessage.success(config.successMsg); |
| | | return; |
| | | } |
| | | if (config.code === 'addRow') { |
| | | // 添加确认提示弹窗,询问用户是否进行当前操作 |
| | | ElMessageBox.confirm('是否添加临时小片?', '确认操作', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | config.addNewRow(); |
| | | ElMessage.success(config.successMsg); |
| | | }).catch(() => { |
| | | ElMessage.info('已取消操作'); |
| | | }); |
| | | return; |
| | | } |
| | | if (config.code === 'copyChecked') { |
| | |
| | | rackNoValue = item.rackNo; |
| | | } |
| | | return { |
| | | width: item.width, |
| | | height: item.height, |
| | | width: parseFloat(item.width) || 0, |
| | | height: parseFloat(item.height) || 0, |
| | | processId: item.processId, |
| | | layer: item.layer, |
| | | totalLayer: item.totalLayer, |
| | | orderSort: item.order_number, |
| | | markIcon: item.markIcon, |
| | | quantity: item.quantity, |
| | | quantity: parseInt(item.quantity) || 0, |
| | | patchState: item.patchState, |
| | | upGrind: item.longGrind1, |
| | | downGrind: item.longGrind2, |
| | |
| | | } |
| | | } |
| | | ); |
| | | |
| | | // 单独处理选中原片数据的逻辑 |
| | | watch( |
| | | () => props.CheckboxChangeData, |
| | |
| | | { |
| | | "label": t('orderBasicData.saleMan'), |
| | | "value": "saleMan" |
| | | }, |
| | | { |
| | | "label": t('order.edgingType'), |
| | | "value": "edgingType" |
| | | } |
| | | ] |
| | | }, |
| | |
| | | { |
| | | "label": t('orderBasicData.saleMan'), |
| | | "value": "saleMan" |
| | | }, |
| | | { |
| | | "label": t('order.edgingType'), |
| | | "value": "edgingType" |
| | | } |
| | | ] |
| | | }, |
| | |
| | | const shapeList = ref([ |
| | | {label:t('order.universalShape'),value:'1'}, {label:t('order.alien'),value:'2'} |
| | | ]) |
| | | const edgingTypeList = ref([]) |
| | | const newOrderId = ref([]) |
| | | |
| | | const orderTypeState = ref(0) |
| | |
| | | orderClassify:[], |
| | | packType:[], |
| | | customer:[], |
| | | saleMan:[] |
| | | saleMan:[], |
| | | edgingType:[] |
| | | }) |
| | | let filterData = ref({}) |
| | | let rowIndex = ref(null) |
| | |
| | | filters:[{ data: '' }], |
| | | slots: { filter: 'num1_filter',edit:'shape_edit',default:'default_shape' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'bendRadius',width:160, title: t('order.bendRadius'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'edgingType',width:160, title: t('order.edgingType'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'edgingType',width:160, title: t('order.edgingType'),editRender: { name: 'input'},filters:[{ data: '' }], |
| | | slots: { filter: 'num1_filter',edit:'edgingType_edit' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'processingNote',width:200, title: t('order.processingNote'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'fileName',width:200, title: t('order.drawingNo'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'remarks',width:140, title: t('basicData.remarks'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | |
| | | |
| | | }) |
| | | } |
| | | titleSelectJson.value.edgingType.forEach(item=>{ |
| | | let type= {label:item.basicName,value:item.basicName} |
| | | edgingTypeList.value.push(type) |
| | | }) |
| | | //进入页面下拉框设置默认值 |
| | | titleUploadData.value.orderType = titleSelectJson.value.orderType[0].basicName |
| | | titleUploadData.value.orderClassify = titleSelectJson.value.orderClassify[0].basicName |
| | |
| | | <template #shape_edit="{ row }"> |
| | | <vxe-select v-model="row.shape" transfer :options="shapeList" placeholder=" "/> |
| | | </template> |
| | | <template #edgingType_edit="{ row }"> |
| | | <vxe-select v-model="row.edgingType" transfer :options="edgingTypeList" placeholder=" "/> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | |
| | | Map<String, Object> getProjectState(String projectNo); |
| | | |
| | | void updateProjectTemperingId(String projectNumber); |
| | | |
| | | List<Map<String, Object>> optimizeTemp(String projectNo); |
| | | } |
| | |
| | | } else { |
| | | dataList = glassOptimizeMapper.directOptimization(projectNo); |
| | | } |
| | | List<Map<String, Object>> tempDataList = null; |
| | | if (Integer.parseInt(stringObjectMap.get("optimize_state").toString())==1) { |
| | | tempDataList = glassOptimizeMapper.optimizeTemp(projectNo); |
| | | } |
| | | |
| | | // 获取磨量配置数据 |
| | | List<Map<String, Object>> grindingTrimmingList = glassOptimizeMapper.getGrindingOptimize(username); |
| | |
| | | } |
| | | } |
| | | } |
| | | if (tempDataList != null && !tempDataList.isEmpty()) { |
| | | dataList.addAll(tempDataList); |
| | | } |
| | | map.put("optimizeState", Integer.parseInt(stringObjectMap.get("optimize_state").toString())); |
| | | map.put("data", dataList); |
| | | map.put("project", glassOptimizeMapper.selectProjectCount(projectNo)); |
| | |
| | | c.project_no, |
| | | d.child_width as 'width', |
| | | d.child_height as 'height', |
| | | (d.child_width + d.child_height) * 2 as 'perimeter', |
| | | (d.child_width + d.child_height) * 2/ 1000 as 'perimeter', |
| | | c.quantity, |
| | | od.shape, |
| | | concat( c.process_id, '-', c.technology_number ) AS 'process_id', |
| | |
| | | c.project_no, |
| | | d.child_width as 'width', |
| | | d.child_height as 'height', |
| | | (d.child_width + d.child_height) * 2 as 'perimeter', |
| | | (d.child_width + d.child_height) * 2/ 1000 as 'perimeter', |
| | | c.patch_num as quantity, |
| | | od.shape, |
| | | concat( c.process_id, '-', c.technology_number ) AS 'process_id', |
| | |
| | | # h.layout_id as heatLayoutId, |
| | | h.width AS width, |
| | | h.height AS height, |
| | | (h.width + h.height) * 2 as 'perimeter', |
| | | (h.width + h.height) * 2 / 1000 as 'perimeter', |
| | | od.shape, |
| | | count( 1 ) AS quantity, |
| | | concat( h.process_id, '-', h.layer ) AS process_id, |
| | |
| | | WHERE |
| | | project_no = #{projectNo} |
| | | </select> |
| | | <select id="optimizeTemp" resultType="java.util.Map" parameterType="java.lang.String"> |
| | | SELECT |
| | | project_no, |
| | | layer, |
| | | o_width as width, |
| | | o_height as height, |
| | | rack_no as rackNo, |
| | | COUNT(*) as quantity, |
| | | ROUND((o_width + o_height) * 2 / 1000, 2) as perimeter, |
| | | ROUND(o_width * o_height * COUNT(*) / 1000000, 4) as area |
| | | FROM |
| | | pp.`optimize_detail` |
| | | WHERE |
| | | project_no = #{projectNo} |
| | | AND process_id = '' |
| | | GROUP BY |
| | | project_no, |
| | | layer, |
| | | o_width, |
| | | o_height, |
| | | rack_no |
| | | ORDER BY |
| | | o_width, |
| | | o_height |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | when 'stepA' then 3 |
| | | when 'stepD' then 4 |
| | | when 'stepB' then 4 |
| | | end as sort |
| | | else 1 |
| | | end as sort, |
| | | b.sort as 'sort2' |
| | | |
| | | |
| | | from order_process_detail |
| | | left join (select DISTINCT basic_name,nickname from basic_data where basic_category = 'process') as b |
| | | left join (select DISTINCT basic_name,nickname,sort from basic_data where basic_category = 'process') as b |
| | | on b.basic_name = process |
| | | where order_id = #{orderId} |
| | | group by process) as a |
| | |
| | | group by opd.id) as a |
| | | GROUP BY process) as sort1 |
| | | on sort1.process = a.process |
| | | order by sort,sort1.count,id |
| | | order by sort,sort2,sort1.count,id |
| | | |
| | | </select> |
| | | |