Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | |
| | | const AreaQuantitySummary = () => { |
| | | |
| | | console.log(produceList.value) |
| | | for (let i = 0; i < produceList.value.length; i++) { |
| | | // 遍历当前项目的 detail 数组 |
| | | for (let j = 0; j < produceList.value[i].detail.length; j++) { |
| | |
| | | } |
| | | }); |
| | | |
| | | // 从子组件SetAmount获取磨量值,并更新表格数据 |
| | | const Amount = (amountData) => { |
| | | nextTick(() => { |
| | | const data = gridOptions.data; |
| | | console.log('接收到的amountData:', amountData); |
| | | console.log('表格原始数据:', data); |
| | | if (data) { |
| | | try { |
| | | const updatedData = []; |
| | | for (let i = 0; i < data.length; i++) { |
| | | const item = data[i]; |
| | | const updatedItem = { |
| | | ...item, |
| | | longGrind1: Number(amountData.quicksetTop), |
| | | longGrind2: Number(amountData.quicksetRight), |
| | | shortGrind1: Number(amountData.quicksetBottom), |
| | | shortGrind2: Number(amountData.quicksetLeft) |
| | | }; |
| | | updatedData.push(updatedItem); |
| | | } |
| | | gridOptions.data = updatedData; |
| | | xGrid.value.loadData(updatedData); |
| | | } catch (error) { |
| | | console.error('更新表格数据时出错:', error); |
| | | // 这里可以根据实际需求添加一些回滚操作或者提示用户的逻辑,比如显示一个错误提示框等 |
| | | ElMessage.error('更新磨量数据时出现错误,请检查输入或联系管理员'); |
| | | } |
| | | } else { |
| | | console.warn('表格数据为空,无法更新磨量值'); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | |
| | | </script> |
| | | |
| | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {defineEmits} from 'vue'; |
| | | |
| | | function setupComponent() { |
| | | // 各个输入框绑定的值,初始化为0 |
| | |
| | | |
| | | const check = ref(true) |
| | | |
| | | const emit = defineEmits(['set-amount']); |
| | | const props = defineProps({ |
| | | closeDialog: Function |
| | | }); |
| | | |
| | | const setAmount = () => { |
| | | const amountData = { |
| | | quicksetTop: quicksetTop.value, |
| | | quicksetRight: quicksetRight.value, |
| | | quicksetBottom: quicksetBottom.value, |
| | | quicksetLeft: quicksetLeft.value |
| | | }; |
| | | emit('set-amount', amountData); |
| | | props.closeDialog(2); |
| | | }; |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | <el-input-number v-model="quicksetLeft" class="left" placeholder="0" |
| | | controls-position="right" :step="0.1" :min="0"></el-input-number> |
| | | </div> |
| | | <el-button type="primary" style="float: right; margin: 184px 0 0 13px;">应用</el-button> |
| | | <el-button type="primary" style="float: right; margin: 184px 0 0 13px;" @click="setAmount">应用</el-button> |
| | | </div> |
| | | |
| | | <div style="margin-top: -20px"> |
| | |
| | | $gridLeft.clearCheckboxRow() |
| | | $grid.clearCheckboxRow() |
| | | } |
| | | if (checkedNum.value){ |
| | | checkedNum.value ='' |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | } catch (e) { |
| | | ElMessage.warning(e.message) |
| | | } |
| | | if (checkedNum.value){ |
| | | checkedNum.value ='' |
| | | } |
| | | } |
| | | //向左边表格添加数据 |
| | | const addLeft = () => { |
| | |
| | | |
| | | } catch (e) { |
| | | ElMessage.warning(e.message) |
| | | } |
| | | if (checkedNum.value){ |
| | | checkedNum.value ='' |
| | | } |
| | | } |
| | | |
| | |
| | | <span><el-input v-model="quantit" style="width: 80px;"/></span> |
| | | <span><el-input v-model="weight" style="width: 80px;"/></span> |
| | | </div> |
| | | <span>{{ $t('processCard.selectedQuantity') }}:<el-input v-model="checkedNum" clearable |
| | | <span>{{ $t('processCard.selectedQuantity') }}:<el-input id="checkedNum" v-model="checkedNum" clearable |
| | | type="number"></el-input></span><br> |
| | | <el-button style="width: 40px;" type="primary" @click="addRight"> →</el-button> |
| | | <br> |
| | |
| | | return |
| | | } |
| | | //gridOptions.columns = JSON.parse(JSON.stringify(columns)) |
| | | res.data.title.forEach(item =>{ |
| | | let column = {slots: { default: 'quantitySum' }, width: 90,title: item.process} |
| | | gridOptions.columns.push(column) |
| | | }) |
| | | res.data.title.forEach((item, index) => { |
| | | let column = { slots: { default: 'quantitySum' }, width: 90, title: item.process }; |
| | | const insertIndex = 5; // 设置插入位置的索引 |
| | | gridOptions.columns = [ |
| | | ...gridOptions.columns.slice(0, insertIndex + index), // 取插入位置之前的部分 |
| | | column, |
| | | ...gridOptions.columns.slice(insertIndex + index) // 取插入位置之后的部分 |
| | | ]; |
| | | }); |
| | | res.data.data.forEach(item => { |
| | | item.reportWorkQuantity=JSON.parse(item.reportWorkQuantity) |
| | | item.reportWorkQuantityCount=JSON.parse(item.reportWorkQuantityCount) |
| | |
| | | },//表头参数 |
| | | columns : [ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {field: 'order_number', width: 150, title: t('order.OrderNum'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | //{field: 'shape',width: 130, title: t('order.shape') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'glassNumber', width: 110,title: t('reportingWorks.glassNumber'),showOverflow:"ellipsis",filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged}, |
| | | {field: 'product_name', width: 120,title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'child_width',width: 110, title: t('order.width')}, |
| | | {field: 'child_height', width: 90,title: t('order.height'),showOverflow:"ellipsis"}, |
| | | {field: 'quantity', width: 90,title: t('order.quantity')}, |
| | | {field: 'technology_number',width: 100, title: t('processCard.technologyNumber'),filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged}, |
| | | {field: 'glass_child',width: 120, title: t('reportingWorks.glassChild')}, |
| | | {field: 'glassNumber', width: 110,title: t('reportingWorks.glassNumber'),showOverflow:"ellipsis",filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged}, |
| | | {field: 'quantity', width: 90,title: t('order.quantity')}, |
| | | |
| | | {field: 'order_number', width: 150, title: t('order.OrderNum'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | //{field: 'shape',width: 130, title: t('order.shape') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'product_name', width: 120,title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'child_width',width: 110, title: t('order.width')}, |
| | | {field: 'child_height', width: 90,title: t('order.height'),showOverflow:"ellipsis"}, |
| | | {field: 'inventoryNum',width: 120, title: t('report.inventoryNum')}, |
| | | {field: 'inventoryArea',width: 120, title: t('report.inventoryArea')}, |
| | | // {field: 'shippedQuantity',width: 120, title: t('report.shippedQuantity')}, |