| | |
| | | }, |
| | | |
| | | columns: [ |
| | | {type:'seq',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {type: 'seq', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {field: 'order_number', title: '订序', width: 70}, |
| | | {field: 'child_width', width: 100, title: t('order.width'), filters: [{data: ''}], slots: {filter: 'num2_filter'}}, |
| | | { |
| | |
| | | [ |
| | | {code: 'setAmount', name: '设置统一磨量',}, |
| | | {code: 'displayProcessCard', name: '显示流程卡',}, |
| | | {code: 'hideProcessCard', name: '隐藏流程卡',}, |
| | | {code: 'setShape', name: '设置图形',}, |
| | | {code: 'Export', name: '数据导出', prefixIcon: 'vxe-icon-download', visible: true, disabled: false}, |
| | | {code: 'safeDXF', name: '图形另存为DXF',}, |
| | |
| | | ] |
| | | }, |
| | | }, |
| | | toolbarConfig: { |
| | | buttons: [], |
| | | slots: { |
| | | buttons: "toolbar" |
| | | }, |
| | | |
| | | }, |
| | | |
| | | }) |
| | | const processCardColumns = reactive([ |
| | | { field: 'process_id', title: '流程卡', width: 200, align: 'center' }, |
| | | { field: 'project', title: '项目名', width: 150, align: 'center' }, |
| | | { field: 'order_number', title: '订序', width: 100, align: 'center' }, |
| | | { field: 'sizes', title: '尺寸', width: 200, align: 'center' }, |
| | | { field: 'layer', title: '层', width: 100, align: 'center' }, |
| | | { field: 'quantity', title: '数量', width: 100, align: 'center' } |
| | | {field: 'process_id', title: '流程卡', width: 200, align: 'center'}, |
| | | {field: 'project', title: '项目名', width: 150, align: 'center'}, |
| | | {field: 'order_number', title: '订序', width: 100, align: 'center'}, |
| | | {field: 'sizes', title: '尺寸', width: 200, align: 'center'}, |
| | | {field: 'layer', title: '层', width: 100, align: 'center'}, |
| | | {field: 'quantity', title: '数量', width: 100, align: 'center'} |
| | | ]); |
| | | |
| | | // 右键菜单 |
| | |
| | | requiresRow: false, |
| | | displayProcess: () => { |
| | | getProcessCard(); |
| | | processCardDialogVisible.value = true; |
| | | } |
| | | }, |
| | | |
| | | { |
| | | code: 'setShape', |
| | | successMsg: '操作成功!', |
| | |
| | | if (config.code === 'setAmount') { |
| | | config.openAmount(); |
| | | ElMessage.success(config.successMsg); |
| | | } else if ( config.code === 'displayProcessCard' ) { |
| | | } else if (config.code === 'displayProcessCard') { |
| | | config.displayProcess(); |
| | | ElMessage.success(config.successMsg); |
| | | } |
| | | else if (['setShape', 'safeDXF', 'exportOPTIMA'].includes(config.code)) { |
| | | } else if (['setShape', 'safeDXF', 'exportOPTIMA'].includes(config.code)) { |
| | | config.showMessage(); |
| | | } |
| | | }).catch(() => { |
| | |
| | | } |
| | | }); |
| | | |
| | | // 流程卡窗口 |
| | | const processCardDialogVisible = ref(false); |
| | | // 用于存储流程卡数据 |
| | | const processCardData = ref(null); |
| | | //流程卡 |
| | |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | |
| | | // 从子组件SetAmount获取磨量值,并更新表格数据 |
| | | const Amount = (amountData) => { |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <div style="width: 100%;height: 100%"> |
| | | <vxe-grid |
| | | @filter-change="filterChanged" |
| | | height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | > |
| | | <div style="width: 100%;height: 100%;display: flex;flex-direction: column;"> |
| | | <!-- 头部 --> |
| | | <div id="header"> |
| | | <!--工程文件菜单--> |
| | | <el-dropdown @command="handleCommand"> |
| | | <el-button type="primary" :icon="Folder" style="margin-top: 8px"> |
| | | 工程文件 |
| | | </el-button> |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item :command="1" :icon="Plus">创建工程</el-dropdown-item> |
| | | <el-dropdown-item :command="2" :icon="Setting">工程管理</el-dropdown-item> |
| | | <el-dropdown-item :command="3" :icon="Operation">模拟计算</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> |
| | | |
| | | <template #num2_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <vxe-select v-model="option.data" :placeholder="$t('processCard.pleaseSelect')" |
| | | @change="changeFilterEvent($event, option, $panel)"> |
| | | <vxe-option value="0" :label="$t('basicData.unchecked')"></vxe-option> |
| | | <vxe-option value="1" :label="$t('basicData.selected')"></vxe-option> |
| | | </vxe-select> |
| | | <div id="title"> |
| | | <span>工程编号:</span> |
| | | <el-input disabled placeholder="" style="width: 150px" v-model="projectNo"></el-input> |
| | | <span>工程名称:</span> |
| | | <el-input disabled placeholder="" style="width: 150px; margin-right: 340px" v-model="projectName"></el-input> |
| | | <el-button id="checkinventory" type="primary" @click="openDialog(1)">查询库存</el-button> |
| | | <el-dialog v-model="dialogVisible[1]" title="查询库存" destroy-on-close style="width: 35%;height:35%;"> |
| | | <check-inventory :closeDialog="closeDialog" @send-data-inventory="handleInventory"/> |
| | | </el-dialog> |
| | | <el-button id="button" type="primary" @click="openDialog(2)">设置磨量</el-button> |
| | | <el-dialog v-model="dialogVisible[2]" title="设置磨量(mm)" destroy-on-close |
| | | style="width: 35%;height:80%;margin-top: 3vh;"> |
| | | <set-amount :closeDialog="closeDialog" @set-amount="Amount"/> |
| | | </el-dialog> |
| | | <el-button id="button" type="primary" @click="openDialog(3)">设置修边</el-button> |
| | | <el-dialog v-model="dialogVisible[3]" title="设置修边(mm)" destroy-on-close |
| | | style="width: 35%;height:80%;margin-top: 3vh;"> |
| | | <set-trimming :closeDialog="closeDialog" @send-data-event="handleTrimmingData"/> |
| | | </el-dialog> |
| | | <el-button id="button" type="primary">保存</el-button> |
| | | <el-button id="button" type="primary" @click="openDialog(4)">优化</el-button> |
| | | <el-dialog v-model="dialogVisible[4]" title="优化计算" destroy-on-close |
| | | style="width: 75%;height:90%;margin-top: 3vh;"> |
| | | <optimize-compute/> |
| | | </el-dialog> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 表格容器 --> |
| | | <div class="table-container" style="flex: 1;display: flex;"> |
| | | <vxe-grid |
| | | class="left-table" |
| | | @filter-change="filterChanged" |
| | | height="100%" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | v-bind:style="{ width: leftTableWidth + '%' }" |
| | | > |
| | | <template #num2_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <vxe-select v-model="option.data" :placeholder="$t('processCard.pleaseSelect')" |
| | | @change="changeFilterEvent($event, option, $panel)"> |
| | | <vxe-option value="0" :label="$t('basicData.unchecked')"></vxe-option> |
| | | <vxe-option value="1" :label="$t('basicData.selected')"></vxe-option> |
| | | </vxe-select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input |
| | | type="type" |
| | | v-model="option.data" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </template> |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input |
| | | type="type" |
| | | v-model="option.data" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </template> |
| | | </vxe-grid> |
| | | |
| | | <template #toolbar> |
| | | <div id="header"> |
| | | <div id="title"> |
| | | <span>工程编号:</span> |
| | | <el-input disabled placeholder="" style="width: 150px" v-model="projectNo"></el-input> |
| | | <span>工程名称:</span> |
| | | <el-input disabled placeholder="" style="width: 150px; margin-right: 350px" |
| | | v-model="projectName"></el-input> |
| | | <el-button id="checkinventory" type="primary" @click="openDialog(1)">查询库存</el-button> |
| | | <el-dialog |
| | | v-model="dialogVisible[1]" |
| | | title="查询库存" |
| | | destroy-on-close |
| | | style="width: 35%;height:35%;"> |
| | | <check-inventory :closeDialog="closeDialog" @send-data-inventory="handleInventory"/> |
| | | </el-dialog> |
| | | |
| | | <el-button id="button" type="primary" @click="openDialog(2)">设置磨量</el-button> |
| | | <el-dialog |
| | | v-model="dialogVisible[2]" |
| | | title="设置磨量(mm)" |
| | | destroy-on-close |
| | | style="width: 35%;height:80%;margin-top: 3vh;"> |
| | | <set-amount :closeDialog="closeDialog" @set-amount="Amount"/> |
| | | </el-dialog> |
| | | |
| | | <el-button id="button" type="primary" @click="openDialog(3)">设置修边</el-button> |
| | | <el-dialog |
| | | v-model="dialogVisible[3]" |
| | | title="设置修边(mm)" |
| | | destroy-on-close |
| | | style="width: 35%;height:80%;margin-top: 3vh;"> |
| | | <set-trimming :closeDialog="closeDialog" @send-data-event="handleTrimmingData"/> |
| | | </el-dialog> |
| | | |
| | | <el-button id="button" type="primary">保存</el-button> |
| | | |
| | | <el-button id="button" type="primary" @click="openDialog(4)">优化</el-button> |
| | | <el-dialog |
| | | v-model="dialogVisible[4]" |
| | | title="优化计算" |
| | | destroy-on-close |
| | | style="width: 75%;height:90%;margin-top: 3vh;" |
| | | > |
| | | <optimize-compute/> |
| | | </el-dialog> |
| | | </div> |
| | | <!--工程文件菜单--> |
| | | <el-dropdown @command="handleCommand"> |
| | | <el-button type="primary" :icon="Folder" style="margin-top: 8px"> |
| | | 工程文件 |
| | | </el-button> |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item :command="1" :icon="Plus">创建工程</el-dropdown-item> |
| | | <el-dropdown-item :command="2" :icon="Setting">工程管理</el-dropdown-item> |
| | | <el-dropdown-item :command="3" :icon="Operation">模拟计算</el-dropdown-item> |
| | | <!-- <el-dropdown-item command="4">文件导出</el-dropdown-item> |
| | | <el-dropdown-item command="5">文件导入</el-dropdown-item>--> |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> |
| | | </div> |
| | | </template> |
| | | </vxe-grid> |
| | | |
| | | <!-- 流程卡表格 --> |
| | | <el-dialog |
| | | v-model="processCardDialogVisible" |
| | | title="流程卡数据" |
| | | width="65%" |
| | | heigth="600px" |
| | | style="height: 500px;" |
| | | > |
| | | <!-- 流程卡表格 --> |
| | | <vxe-grid |
| | | height="100%" |
| | | class="mytable - scrollbar" |
| | | class="right-table" |
| | | :data="processCardData" |
| | | :columns="processCardColumns" |
| | | > |
| | | </vxe-grid> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .table-container { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .left-table { |
| | | float: left; |
| | | width: 50%; |
| | | } |
| | | |
| | | .right-table { |
| | | width: 660px; |
| | | } |
| | | |
| | | #header { |
| | | height: 50px; |
| | | display: flex; |
| | | |
| | | } |
| | | |
| | | #title { |
| | | position: absolute; |
| | | right: 10px; |
| | | margin-top: 8px; |
| | | margin: 8px 5px; |
| | | width: 1240px; |
| | | } |
| | | |
| | | #button { |