| | |
| | | dataForGlassInventory.value = data; |
| | | }; |
| | | |
| | | //获取GlassInventory的值 |
| | | const sendDataGlassInventory = ref() |
| | | |
| | | const handleInventoyData = (selectedLabel1,selectedLabel2) => { |
| | | sendDataGlassInventory.value = { |
| | | selectedLabel1, selectedLabel2 |
| | | }; |
| | | }; |
| | | |
| | | </script> |
| | | |
| | | <template > |
| | | <div style="width: 100%;height: 100%"> |
| | | <div id="main-body"> |
| | | <project-detail @changeDialog="changeDialog" @forward-data-to-grandparent="handleProjectDetailData"/> |
| | | <project-detail @changeDialog="changeDialog" @forward-data-to-grandparent="handleProjectDetailData" @send-inventory-to-op="handleInventoyData"/> |
| | | </div> |
| | | <div id="main-footer"> |
| | | <glass-inventory :receivedData="dataForGlassInventory"/> |
| | | <glass-inventory :receivedData="dataForGlassInventory" :InventoryData="sendDataGlassInventory"/> |
| | | </div> |
| | | |
| | | |
| | |
| | | <script setup> |
| | | import {ref} from "vue"; |
| | | import {defineEmits, ref} from "vue"; |
| | | |
| | | const value1 = ref('') |
| | | const value2 = ref('') |
| | |
| | | label: 'Low-e', |
| | | }, |
| | | ] |
| | | |
| | | const emit = defineEmits(['send-data-inventory',]); |
| | | const props = defineProps({ |
| | | closeDialog: Function |
| | | }); |
| | | |
| | | const CheckInventory = () => { |
| | | const selectedLabel1 = options1.find((option) => option.value === value1.value)?.label || ''; |
| | | const selectedLabel2 = options2.find((option) => option.value === value2.value)?.label || ''; |
| | | // 判断两个值是否都被选择了,如果有一个为空字符串,则提示并返回,不执行后续操作 |
| | | if (!selectedLabel1 ||!selectedLabel2) { |
| | | window.alert('请选择相关选项'); |
| | | return; |
| | | } |
| | | props.closeDialog(1); |
| | | emit('send-data-inventory', selectedLabel1,selectedLabel2); |
| | | }; |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | </div> |
| | | |
| | | <div style="float: right; margin:-55px 35px 0 0;"> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button type="primary" @click="CheckInventory">查询</el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | } |
| | | }, { immediate: true }); |
| | | |
| | | watch(() => props.InventoryData, (newInventoryData) => { |
| | | if (newInventoryData) { |
| | | thickness.value = newInventoryData.selectedLabel1; |
| | | model.value = newInventoryData.selectedLabel2; |
| | | // 由于 thickness 和 model 的值改变了,更新表格,调用 selectMaterialStore 重新获取数据 |
| | | selectMaterialStore(); |
| | | } |
| | | }); |
| | | |
| | | const props = defineProps({ |
| | | receivedData : { |
| | | type: Object, |
| | |
| | | quicksetBottom: { type: Number }, |
| | | quicksetRight: { type: Number }, |
| | | quicksetTop: { type: Number } |
| | | }} |
| | | } |
| | | }, |
| | | InventoryData : { |
| | | type: Object, |
| | | required: false, |
| | | properties: { |
| | | selectedLabel1: { type: String }, |
| | | selectedLabel2: { type: String }, |
| | | } |
| | | } |
| | | }); |
| | | |
| | | //接受SetTrimming的值 (修边) |
| | | const Trimming = (receivedData) => { |
| | | nextTick(() => { |
| | | const data = gridOptions.data; |
| | | console.log('接收到的receivedData:', receivedData); |
| | | console.log('表格原始数据:', data); |
| | | if (data) { |
| | | try { |
| | | const updatedData = []; |
| | |
| | | slots: { |
| | | buttons: "toolbar" |
| | | }, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | |
| | | }) |
| | |
| | | const Amount = (amountData) => { |
| | | nextTick(() => { |
| | | const data = gridOptions.data; |
| | | console.log('接收到的amountData:', amountData); |
| | | console.log('表格原始数据:', data); |
| | | if (data) { |
| | | try { |
| | | const updatedData = []; |
| | |
| | | }); |
| | | }; |
| | | |
| | | //中转站接受SetTrimming的值 |
| | | //中转站接受SetTrimming的值(设置修边) |
| | | const emit = defineEmits([ |
| | | 'changeDialog', |
| | | 'forward-data-to-grandparent' |
| | | 'forward-data-to-grandparent', |
| | | 'send-inventory-to-op' |
| | | ]); |
| | | |
| | | const handleTrimmingData = (data) => { |
| | | emit('forward-data-to-grandparent', data); |
| | | }; |
| | | |
| | | //中转站接受CheckInventory的值(查询库存) |
| | | const handleInventory = (selectedLabel1,selectedLabel2) => { |
| | | emit('send-inventory-to-op', selectedLabel1,selectedLabel2); |
| | | } |
| | | |
| | | </script> |
| | | |
| | |
| | | title="查询库存" |
| | | destroy-on-close |
| | | style="width: 35%;height:35%;"> |
| | | <check-inventory /> |
| | | <check-inventory :closeDialog="closeDialog" @send-data-inventory="handleInventory"/> |
| | | </el-dialog> |
| | | |
| | | <el-button id="button" type="primary" @click="openDialog(2)">设置磨量</el-button> |
| | |
| | | > |
| | | <optimize-compute/> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | <!--工程文件菜单--> |
| | | <el-dropdown @command="handleCommand"> |