| | |
| | | <script setup> |
| | | import {onMounted, reactive, ref} from "vue"; |
| | | import {useI18n} from "vue-i18n"; |
| | | import { |
| | | Folder, |
| | | Plus, |
| | | Setting, |
| | | Operation, |
| | | } from "@element-plus/icons-vue"; |
| | | import {Folder, Plus, Setting, Operation,} from "@element-plus/icons-vue"; |
| | | import OptimizeCompute from "@/views/pp/glassOptimize/page/OptimizeCompute.vue"; |
| | | import SetAmount from "@/views/pp/glassOptimize/page/SetAmount.vue"; |
| | | import SetTrimming from "@/views/pp/glassOptimize/page/SetTrimming.vue"; |
| | | import CheckInventory from "@/views/pp/glassOptimize/page/CheckInventory.vue"; |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | import { useRoute } from 'vue-router'; |
| | | |
| | | |
| | | const {t} = useI18n() |
| | | |
| | |
| | | mode: 'row', |
| | | showStatus: true |
| | | }, |
| | | /*formConfig: { |
| | | data: { |
| | | width: '', |
| | | height: '', |
| | | quantity: '' |
| | | }, |
| | | items: [ |
| | | { field: 'width', title: t('order.width')+':', itemRender: { name: 'VxeInput' } }, |
| | | { field: 'height', title: t('order.height')+':', itemRender: { name: 'VxeInput' } }, |
| | | { field: 'quantity', title: t('order.quantity')+':', itemRender: { name: 'VxeInput' } }, |
| | | { |
| | | itemRender: { |
| | | name: 'VxeButtonGroup', |
| | | options: [ |
| | | { type: 'submit', content: t('craft.sure'), status: 'primary' }, |
| | | { type: 'reset', content: t('product.msg.reset') } |
| | | ] |
| | | } |
| | | } |
| | | ] |
| | | },*/ |
| | | |
| | | columns: [ |
| | | {field: 'seq', title: '', width: 70}, |
| | | {field: 'order_number', title: '订序', width: 70}, |
| | | {field: 'child_width', width: 100, title: t('order.width'), filters: [{data: ''}], slots: {filter: 'num2_filter'}}, |
| | | {field: 'child_height', width: 100, title: t('order.height'),filters: [{data: ''}],slots: {filter: 'num2_filter'}}, |
| | | {field: 'quantity', width: 150, title: t('order.quantity'), filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}, |
| | | {field: '', width: 150, title: '长磨1', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}, |
| | | {field: '', width: 150, title: '长磨2', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}, |
| | | {field: '', width: 150, title: '短磨1', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}, |
| | | {field: '', width: 150, title: '短磨1', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}, |
| | | {field: 'longGrind1', width: 150, title: '长磨1', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}, |
| | | {field: 'longGrind2', width: 150, title: '长磨2', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}, |
| | | {field: 'shortGrind1', width: 150, title: '短磨1', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}, |
| | | {field: 'shortGrind2', width: 150, title: '短磨2', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}, |
| | | { |
| | | field: 'shape', |
| | | width: 150, |
| | |
| | | sortable: true |
| | | }, |
| | | { |
| | | field: 'building_number', |
| | | field: 'remark', |
| | | width: 150, |
| | | title: t('order.buildingNumber'), |
| | | title: t('basicData.remarks'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | | }, |
| | | { |
| | | field: 'remark', |
| | | field: 'building_number', |
| | | width: 150, |
| | | title: t('basicData.remarks'), |
| | | title: '楼层号', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | sortable: true |
| | |
| | | }, |
| | | |
| | | { |
| | | field: '', |
| | | field: 'shelf_number', |
| | | width: 150, |
| | | title: '架号', |
| | | filters: [{data: ''}], |
| | |
| | | const openDialog = (index) => { |
| | | dialogVisible.value[index] = true; |
| | | }; |
| | | |
| | | const route = useRoute(); |
| | | //工程号 |
| | | const projectNo = ref('P24120301'); |
| | | const projectNo = ref(route.params.projectNo); |
| | | const projectName = ref(''); |
| | | console.log(projectNo.value); |
| | | |
| | | const fetchData = () => { |
| | | request.post(`/glassOptimize/projectInfo/${projectNo.value}`).then((res) => { |
| | | if ((Number(res.code) === 200)) { |
| | | const data = res.data.data; |
| | | data.forEach(item => { |
| | | item.longGrind1 = 0; |
| | | item.longGrind2 = 0; |
| | | item.shortGrind1 = 0; |
| | | item.shortGrind2 = 0; |
| | | item.shelf_number = 0; |
| | | }); |
| | | xGrid.value.loadData(res.data.data); |
| | | projectName.value = res.data.data[0].project_name; |
| | | } else { |
| | | ElMessage.warning(res.msg); |
| | | } |
| | | }).catch((error) => { |
| | | console.error("获取数据出错:", error); |
| | | ElMessage.error('获取数据时出现错误,请稍后再试'); |
| | | }); |
| | | }; |
| | | onMounted(() => { |
| | | fetchData(); |
| | | if (projectNo.value) { |
| | | fetchData(); |
| | | } |
| | | }); |
| | | |
| | | |
| | |
| | | <div id="header"> |
| | | <div id="title"> |
| | | <span>工程编号:</span> |
| | | <vxe-input disabled placeholder=""></vxe-input> |
| | | <el-input disabled placeholder="" style="width: 150px" v-model="projectNo"></el-input> |
| | | <span>工程名称:</span> |
| | | <vxe-input placeholder="" style="margin-right: 270px"></vxe-input> |
| | | <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]" |