From a7cc9c3be58bccd868bc8c12ed57c2b90fedc6b8 Mon Sep 17 00:00:00 2001
From: chenlu <1320612696@qq.com>
Date: 星期四, 05 十二月 2024 17:02:59 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
---
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue | 74 ++++++++++++++++---------------------
1 files changed, 32 insertions(+), 42 deletions(-)
diff --git a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue
index feb8583..89fd57b 100644
--- a/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue
+++ b/north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue
@@ -1,18 +1,15 @@
<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()
@@ -44,37 +41,16 @@
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,
@@ -93,17 +69,17 @@
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
@@ -126,7 +102,7 @@
},
{
- field: '',
+ field: 'shelf_number',
width: 150,
title: '鏋跺彿',
filters: [{data: ''}],
@@ -179,23 +155,37 @@
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();
+ }
});
@@ -240,9 +230,9 @@
<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]"
--
Gitblit v1.8.0