From bc95c00a71435816368588c8f505798f2b7c3cc7 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期一, 22 四月 2024 16:50:05 +0800
Subject: [PATCH] 注释线程
---
UI-Project/src/views/Returns/returns.vue | 400 ++++++++++++++++++++++++++++++--------------------------
1 files changed, 213 insertions(+), 187 deletions(-)
diff --git a/UI-Project/src/views/Returns/returns.vue b/UI-Project/src/views/Returns/returns.vue
index d757769..12cd2dd 100644
--- a/UI-Project/src/views/Returns/returns.vue
+++ b/UI-Project/src/views/Returns/returns.vue
@@ -5,34 +5,177 @@
const router = useRouter()
import type { TableColumnCtx } from 'element-plus'
-import { ref } from 'vue'
+// import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
const dialogFormVisible = ref(false)
const add = ref(false)
const adda = ref(false)
-const value = ref('')
+// const value = ref('')
import request from "@/utils/request"
-request.post(`/LoadGlass/SelectAll`).then((res) => {
- console.log(555555555555);
- if (res.code == 200) {
- console.log(1111);
- // console.log(res.data);
- } else {
- ElMessage.warning(res.msg)
+import { ref, onMounted } from "vue";
+// import http from "@/http/index";
+
+let ruleForm = ref({
+ workstationId: '',
+ patternHeigth: '',
+ patternWidth: '',
+ filmsId: '',
+ patternThickness: '',
+ number: '',
+
+})
+const tableDataa = ref([])
+
+ const requestData = {
+ // projectNo:"P24030805",
+ state:100
+ };
+
+ const tableData = reactive([]);
+// let filterData = ref({
+// damageDetails: {
+// state: '',
+// },
+
+// })
+// 鍙戦�佽幏鍙栬〃鏍兼暟鎹殑璇锋眰
+const fetchTableData = async () => {
+ try {
+ // 鍙戦�佽幏鍙栬〃鏍兼暟鎹殑璇锋眰锛屽苟绛夊緟鍝嶅簲
+ // const response = await request.post("/loadGlass/optimizeProject/listByState", requestData);
+ const response = await request.get("/loadGlass/up-patten-usage/prioritylist");
+
+ // 妫�鏌ュ搷搴旂姸鎬�
+ if (response.code === 200) {
+ // 鏇存柊琛ㄦ牸鏁版嵁
+ console.log('鎴愬姛鑾峰彇琛ㄦ牸鏁版嵁:', response.data);
+ tableData.splice(0, tableData.length, ...response.data);
+ } else {
+ // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
+ ElMessage.error(response.msg);
+ }
+ } catch (error) {
+ // 澶勭悊璇锋眰澶辫触鐨勬儏鍐�
+ ElMessage.error('鑾峰彇琛ㄦ牸鏁版嵁澶辫触锛岃閲嶈瘯');
+ }
+};
+request.get("/loadGlass/LoadGlass/list").then((res) => {
+ if (res.code == 200) {
+ console.log(res.data);
+ tableDataa.value = res.data
+ // workstationId.value = res.data[0].workstationId
+ } else {
+ ElMessage.warning(res.msg)
router.push("/login")
- }
-});
+ }
+ });
+//瀹氫箟鎺ユ敹鍔犺浇琛ㄥご涓嬫媺鏁版嵁
+const titleSelectJson = ref({
+ processType: [],
-// request.get("/LoadGlass/SelectAll").then((res) => {
-// if (res.code == 200) {
-// console.log(res.data);
-// } else {
-// ElMessage.warning(res.msg)
-// router.push("/login")
-// }
-// });
+})
+const getBasicData = ref({
+ id: '',
+ projectNo: '',
+})
+request.post("/loadGlass/optimizeProject/listByState", requestData)
+.then((res) => {
+ if (res.code == 200) {
+ titleSelectJson.value.processType = res.data;
+ console.log(res.data);
+ } else {
+ ElMessage.warning(res.msg)
+ router.push("/login")
+ }
+ });
+
+// const billall = () => {
+// request.post("/loadGlass/optimizeProject/listByState", requestData)
+// .then((res: any) => {
+// // if (res.code == 200) {
+// tableData.value = res.data;
+// // let self = this
+// // }
+// })
+// .catch((err: any) => {});
+// }
+const user = ref('');
+// 瀹氫箟琛ㄥご涓婁紶鏁版嵁
+let titleUploadData = ref({
+ projectNo:'',
+})
+// const billall = {
+// data () {
+// return {
+// form: {
+// projectNo: '',
+// },
+// billall:[],
+// }
+// },
+// methods:{
+// }
+// }
+const workstationId = ref('');
+const patternHeigth = ref('');
+const patternWidth = ref('');
+const filmsId = ref('');
+const patternThickness = ref('');
+const number = ref('');
+
+// 娣诲姞
+ const handleConfirm = async () => {
+ try {
+ const response = await request.post('/loadGlass/LoadGlass/updateGlassMessage', {
+ workstationId: workstationId.value,
+ patternHeigth: patternHeigth.value,
+ patternWidth: patternWidth.value,
+ filmsId: filmsId.value,
+ patternThickness: patternThickness.value,
+ number: number.value
+ });
+
+ if (response.code == 200) {
+ // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫
+ ElMessage.success(response.message);
+ add.value = false;
+ } else {
+ // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
+ ElMessage.error(response.msg);
+ }
+ } catch (error) {
+ // 澶勭悊閿欒
+ console.error(error);
+ }
+};
+// 鍒犻櫎
+const handleConfirma = async () => {
+ try {
+ const response = await request.post('/loadGlass/LoadGlass/updateGlassMessage', {
+ workstationId: workstationId.value,
+ patternHeigth: 0,
+ patternWidth: 0,
+ filmsId: "",
+ patternThickness: 0,
+ number: 0
+ });
+
+ if (response.code == 200) {
+ // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫
+ ElMessage.success(response.message);
+ adda.value = false;
+ } else {
+ // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭�
+ ElMessage.error(response.msg);
+ }
+ } catch (error) {
+ // 澶勭悊閿欒
+ console.error(error);
+ }
+};
+onMounted(fetchTableData);
interface User {
id: string
name: string
@@ -67,59 +210,8 @@
}
}
}
-}
+}
-const options = [
- {
- value: 'Option1',
- label: 'P202561456',
- },
- {
- value: 'Option2',
- label: 'P202561456',
- },
- {
- value: 'Option3',
- label: 'P202561456',
- },
- {
- value: 'Option4',
- label: 'P202561456',
- },
- {
- value: 'Option5',
- label: 'P202561456',
- },
-]
-const tableData: User[] = [
-
- {
- id: 'P202561456',
- long: '1005',
- wide: '183.6',
- thick: '1991',
- },
- {
- id: 'P202561456',
- long: '105',
- wide: '183',
- thick: '191',
- }
-]
-const tableDataa = [
- {
- long: '1005',
- wide: '183.6',
- thick: '1991',
- station: '1'
- },
- {
- long: '105',
- wide: '183',
- thick: '191',
- station: '1'
- }
-]
const open = () => {
ElMessageBox.confirm(
'鏄惁鍒犻櫎璇ユ潯淇℃伅?',
@@ -142,20 +234,6 @@
message: '鍒犻櫎澶辫触',
})
})
-}
-const getTableRow = (type) =>{
- switch (type) {
- case 'edit' :{
- //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅')
- // router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }})
- break
- state: true
- }
- case 'delete':{
- alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅')
- break
- }
- }
}
const gridOptions = reactive({
@@ -212,72 +290,66 @@
<el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="primary">寮�濮嬩笂鐗�</el-button>
<el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="warning" >鏆傚仠</el-button>
<el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="danger" >鍋滄浠诲姟</el-button>
- <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" v-loading="loading">
- <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto">
- <!-- <el-table height="100%" ref="table" :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
- <el-table-column prop="id" align="center" label="宸ョ▼鍙�" min-width="80" />
- <el-table-column prop="long" align="center" label="鍘熺墖瀹�" min-width="120" />
- <el-table-column prop="wide" align="center" label="鍘熺墖闀�" min-width="120" />
- <el-table-column prop="thick" align="center" label="鑶滅郴" min-width="120" />
- <el-table-column prop="thick" align="center" label="鏁伴噺" min-width="120" />
- <el-table-column
- align="center"
- label="鐘舵��"
- min-width="80"
- >
- <el-tag type="success">灏辩华</el-tag>
- </el-table-column>
- </el-table> -->
+ <el-card style="flex: 1;margin-left: 10px;margin-top: 15px;" v-loading="loading">
+ <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
<el-table
- height="100%"
- ref="table"
+ height="150"
+ ref="table"
:header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
:data="tableData"
- :span-method="objectSpanMethod"
>
- <el-table-column prop="id" label="宸ョ▼鍙�" width="200" align="center"/>
- <el-table-column prop="long" label="鍘熺墖瀹�" align="center"/>
- <el-table-column prop="wide" label="鍘熺墖闀�" align="center"/>
- <el-table-column prop="thick" label="鑶滅郴" align="center"/>
- <el-table-column prop="thick" label="鏁伴噺" align="center"/>
- <el-table-column prop="wide" label="鍘氬害" align="center"/>
+ <el-table-column prop="engineeringId" label="宸ョ▼鍙�" width="200" align="center"/>
+ <el-table-column prop="width" label="鍘熺墖瀹�" align="center"/>
+ <el-table-column prop="height" label="鍘熺墖闀�" align="center"/>
+ <el-table-column prop="filmsId" label="鑶滅郴" align="center"/>
+ <el-table-column prop="layoutSequence" label="鏁伴噺" align="center"/>
+ <el-table-column prop="thickness" label="鍘氬害" align="center"/>
<el-table-column
align="center"
label="鐘舵��"
min-width="80"
+ prop="state"
>
- <el-tag type="success">灏辩华</el-tag>
- <!-- <el-tag type="danger">鏈氨缁�</el-tag> -->
+ <!-- <el-tag type="success" v-if="damageDetails.state === 1">灏辩华</el-tag> -->
+ <!-- <el-tag type="danger" v-if="row.enableState==2">鏈氨缁�</el-tag> -->
</el-table-column>
</el-table>
</div>
</el-card>
<div id="parent">
- <img src="../../assets/shangpianji .png" alt="" style="max-width: 20%;max-height: 20%;margin-top: 20px;margin-left: 500px;">
- <el-button style="margin-top: -830px;margin-left: -40px;" size="mini" id="searchButton" @click="add = true">娣诲姞鍘熺墖</el-button>
- <el-button style="margin-top: -10px;margin-left: -80px;" size="mini" id="searchButton" @click="adda = true">娣诲姞鍘熺墖</el-button>
- <!-- <div id="overlay" v-show="state"></div> -->
- <!-- <div id="overlaya" v-show="statea"></div> -->
+ <img src="../../assets/shangpianji.png" alt="" style="max-width: 20%;max-height: 20%;margin-top: 20px;margin-left: 500px;">
</div>
+ <div style="margin-top: -350px;margin-left: 650px;">
+ <el-table :data="tableDataa" border style="width: 60%"
+ :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"
+ >
+ <el-table-column prop="patternWidth" align="center" label="瀹�" min-width="80" />
+ <el-table-column prop="patternHeigth" align="center" label="闀�" min-width="80" />
+ <el-table-column prop="filmsId" align="center" label="鑶滅郴" min-width="80" />
+ <el-table-column prop="number" align="center" label="鏁伴噺" min-width="80" />
+ <el-table-column fixed="right" label="鎿嶄綔" align="center" width="150">
+ <template #default>
+ <el-button size="mini" type="text" plain @click="add = true">娣诲姞</el-button>
+ <el-button size="mini" type="text" plain @click="adda = true">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
</div>
<el-dialog v-model="dialogFormVisible" top="24vh" width="30%" title="宸ョ▼" >
<div style="margin-left: 50px;margin-bottom: 10px;">
<el-form-item label="宸ョ▼鍙凤細" :required="true">
- <el-select
- v-model="value"
- clearable
- placeholder="璇烽�夋嫨宸ョ▼"
- style="width: 300px"
- >
- <el-option
- v-for="item in options"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- />
- </el-select>
+ <el-select v-model="getBasicData.projectNo" clearable placeholder="璇烽�夋嫨宸ョ▼" style="width: 220px"
+ >
+ <el-option
+ v-for="item in titleSelectJson['processType']"
+ :key="item.id"
+ :label="item.projectNo"
+ :value="item.projectNo"
+ />
+ </el-select>
</el-form-item>
</div>
<template #footer>
@@ -298,14 +370,14 @@
<div id="dt" style="font-size: 15px;">
<div>
<el-form-item label="闀匡細" :required="true" style="width: 14vw">
- <el-input autocomplete="off" />
+ <el-input v-model="patternHeigth" autocomplete="off" />
</el-form-item></div></div>
</el-col>
<el-col :span="9">
<div id="dta" style="font-size: 15px;">
<div>
<el-form-item label="瀹斤細" :required="true" style="width: 14vw">
- <el-input autocomplete="off" />
+ <el-input v-model="patternWidth" autocomplete="off" />
</el-form-item></div>
</div>
</el-col>
@@ -315,14 +387,14 @@
<div id="dt" style="font-size: 15px;">
<div>
<el-form-item label="鑶滅郴锛�" :required="true" style="width: 14vw;">
- <el-input autocomplete="off" />
+ <el-input v-model="filmsId" autocomplete="off" />
</el-form-item></div></div>
</el-col>
<el-col :span="9">
<div id="dta" style="font-size: 15px;">
<div>
<el-form-item label="鍘氬害锛�" :required="true" style="width: 14vw">
- <el-input autocomplete="off" />
+ <el-input v-model="patternThickness" autocomplete="off" />
</el-form-item></div></div>
</el-col>
</el-row>
@@ -331,7 +403,7 @@
<div id="dt" style="font-size: 15px;">
<div>
<el-form-item label="鏁伴噺锛�" :required="true" style="width: 14vw;">
- <el-input autocomplete="off" />
+ <el-input v-model="number" autocomplete="off" />
</el-form-item></div></div>
</el-col>
</el-row>
@@ -340,65 +412,17 @@
</div>
<template #footer>
<div id="dialog-footer">
- <el-button type="primary" @click="getTableRow('edit')">
+ <el-button type="primary" @click="handleConfirm">
纭
</el-button>
<el-button @click="add = false">鍙栨秷</el-button>
</div>
</template>
</el-dialog>
- <el-dialog v-model="adda" top="23vh" width="45%" title="娣诲姞鍘熺墖" >
- <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;">
- <el-form size="mini" >
- <el-form label-width="70px" label-position="right">
- <el-row style="margin-top: -15px;margin-bottom: -2px;">
- <el-col :span="6">
- <div id="dt" style="font-size: 15px;">
- <div>
- <el-form-item label="闀匡細" :required="true" style="width: 14vw">
- <el-input autocomplete="off" style="width: 180px" />
- </el-form-item></div></div>
- </el-col>
- <el-col :span="9">
- <div id="dta" style="font-size: 15px;">
- <div>
- <el-form-item label="瀹斤細" :required="true" style="width: 14vw">
- <el-input autocomplete="off" style="width: 180px" />
- </el-form-item></div>
- </div>
- </el-col>
- </el-row>
- <el-row style="margin-top: 10px;">
- <el-col :span="6">
- <div id="dt" style="font-size: 15px;">
- <div>
- <el-form-item label="鑶滅郴锛�" :required="true" style="width: 14vw;">
- <el-input autocomplete="off" style="width: 180px" />
- </el-form-item></div></div>
- </el-col>
- <el-col :span="9">
- <div id="dta" style="font-size: 15px;">
- <div>
- <el-form-item label="鍘氬害锛�" :required="true" style="width: 14vw">
- <el-input autocomplete="off" style="width: 180px" />
- </el-form-item></div></div>
- </el-col>
- </el-row>
- <el-row style="margin-top: 10px;">
- <el-col :span="6">
- <div id="dt" style="font-size: 15px;">
- <div>
- <el-form-item label="鏁伴噺锛�" :required="true" style="width: 14vw;">
- <el-input autocomplete="off" style="width: 180px" />
- </el-form-item></div></div>
- </el-col>
- </el-row>
- </el-form>
- </el-form>
- </div>
+ <el-dialog v-model="adda" top="25vh" width="25%" title="鏄惁鍒犻櫎" >
<template #footer>
<div id="dialog-footer">
- <el-button type="primary" @click="adda = false">
+ <el-button type="primary" @click="handleConfirma">
纭
</el-button>
<el-button @click="adda = false">鍙栨秷</el-button>
@@ -420,11 +444,12 @@
margin-left: 20px;
size: 50px;
margin-top: 20px;
- margin-bottom: 20px;
+ margin-bottom: 10px;
}
#parent{
position: relative;
width: 1500px;
+ margin-left: -300px
}
#overlay{
position: absolute;
@@ -444,4 +469,5 @@
margin-top: -40px;
margin-left: 167px;
}
+
</style>
\ No newline at end of file
--
Gitblit v1.8.0