From eea9f3f7b76d4e6bb8e79e8d0e07ffe9d4b66b5c Mon Sep 17 00:00:00 2001 From: wang <3597712270@qq.com> Date: 星期二, 21 五月 2024 14:24:57 +0800 Subject: [PATCH] 调整上片机刷新方式,新增磨边(冷加工)界面 --- UI-Project/src/views/StockBasicData/stockBasicData.vue | 166 +++------ UI-Project/src/views/Returns/returns.vue | 61 +-- UI-Project/src/views/Identify/identify.vue | 16 UI-Project/src/views/StockBasicData/stockBasicDatatwo.vue | 183 +++++++++++ UI-Project/src/views/StockBasicData/Select.vue | 507 ++----------------------------- UI-Project/src/router/index.js | 11 6 files changed, 314 insertions(+), 630 deletions(-) diff --git a/UI-Project/src/router/index.js b/UI-Project/src/router/index.js index c0773c2..910f514 100644 --- a/UI-Project/src/router/index.js +++ b/UI-Project/src/router/index.js @@ -112,13 +112,18 @@ /*----------- 纾ㄨ竟锛堝喎鍔犲伐锛� ----------------*/ { path: 'StockBasicData', - name: 'StockBasicData', - component: () => import('../views/StockBasicData/stockBasicData.vue'), + name: 'Select', + component: () => import('../views/StockBasicData/Select.vue'), children:[ { path: '/StockBasicData/stockBasicData', name: 'stockBasicData', component: () => import('../views/StockBasicData/stockBasicData.vue') + }, + { + path: '/StockBasicData/stockBasicDatatwo', + name: 'stockBasicDatatwo', + component: () => import('../views/StockBasicData/stockBasicDatatwo.vue') }, ] }, @@ -231,7 +236,7 @@ }, { path: '', - redirect: '/Slicecage/slicecage' + redirect: '/returns/returns' } ] }, diff --git a/UI-Project/src/views/Identify/identify.vue b/UI-Project/src/views/Identify/identify.vue index c8c0ce0..84ef2b6 100644 --- a/UI-Project/src/views/Identify/identify.vue +++ b/UI-Project/src/views/Identify/identify.vue @@ -26,16 +26,12 @@ </div> <!-- 鐐瑰嚮寮瑰嚭 --> <el-dialog v-model="blind" top="30vh" width="15%" style="text-align: center;"> - <!-- <template #footer> --> - <!-- <div id="dialog-footer"> --> <el-button type="warning" plain :icon="Delete" @click="handleDamage(currentGlassId)" style="width: 120px;margin-left: 10px;"> 鐮存崯 </el-button> <el-button type="danger" plain @click="handleManualTake(currentGlassId)" style="width: 120px;margin-top: 10px;"> <el-icon class="el-icon--right"><Upload /></el-icon> 浜哄伐鎷胯蛋</el-button> - <!-- </div> --> - <!-- </template> --> </el-dialog> </div> </div> @@ -113,6 +109,7 @@ ElMessage.success(response.message); // window.location.reload() blind.value = false; + updateRectStatus(currentGlassId.value, 201); } else { // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭� ElMessage.error(response.msg); @@ -138,6 +135,7 @@ ElMessage.success(response.message); // window.location.reload() blind.value = false; + updateRectStatus(currentGlassId.value, 200); } else { // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭� ElMessage.error(response.msg); @@ -165,7 +163,15 @@ default: return '#911005'; // 榛樿棰滆壊 } -} +} +// 鏇存柊鐭╁舰鐘舵�� +function updateRectStatus(glassId: string, status: number) { + adjustedRects.value.forEach(rect => { + if (rect.glass_id === glassId) { + rect.glass_state = status; // 鏇存柊鐭╁舰鐨勭姸鎬� + } + }); +} </script> <style scoped> diff --git a/UI-Project/src/views/Returns/returns.vue b/UI-Project/src/views/Returns/returns.vue index c917ca0..1bf0404 100644 --- a/UI-Project/src/views/Returns/returns.vue +++ b/UI-Project/src/views/Returns/returns.vue @@ -14,6 +14,7 @@ const adda = ref(false) const flake = ref(false) const flakea = ref(false) +const state = reactive({updateKey: 0}) // const value = ref('') import request from "@/utils/request" const ida = ref(null); @@ -244,8 +245,9 @@ if (response.code == 200) { // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫 ElMessage.success(response.message); - window.location.reload() + // window.location.reload() add.value = false; + tableDataa.value = response.data; window.localStorage.setItem('workstationId', response.data.workstationId) let workstationId = window.localStorage.getItem('workstationId') if (workstationId == '1') { @@ -277,8 +279,9 @@ if (response.code == 200) { // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫 ElMessage.success(response.message); - window.location.reload() + // window.location.reload() add.value = false; + tableDataa.value = response.data; window.localStorage.setItem('workstationId', response.data.workstationId) let workstationId = window.localStorage.getItem('workstationId') if (workstationId == '1') { @@ -320,6 +323,7 @@ // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫 ElMessage.success(response.message); adda.value = false; + tableDataa.value = response.data; window.localStorage.setItem('workstationId', response.data.workstationId) let workstationId = window.localStorage.getItem('workstationId') if (workstationId == '1') { @@ -345,7 +349,7 @@ if (response.code == 200) { // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫 ElMessage.success(response.message); - window.location.reload() + // window.location.reload() dialogFormVisible.value = false; } else { // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭� @@ -367,8 +371,10 @@ if (response.code == 200) { // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫 ElMessage.success(response.message); - window.location.reload() + // window.location.reload() blind.value = false; + tableData.splice(0, tableData.length, ...response.data); + } else { // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭� ElMessage.error(response.msg); @@ -379,36 +385,6 @@ console.error(error); } } -// const handle = async () => { -// try { -// let engineeringId = window.localStorage.getItem('engineeringId') -// console.log(engineeringId); -// if (engineeringId !== '') { -// const response = await request.post('/loadGlass/engineering/engineering/changeTask', { -// engineeringId: engineerId.va, -// state: 1, -// }) -// if (response.code == 200) { -// // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫 -// ElMessage.success(response.message); -// blind.value = false; -// } else { -// // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭� -// ElMessage.error(response.msg); -// } -// } -// else { -// ElMessage({ -// type: 'info', -// message: '宸ョ▼鍙蜂笉鑳戒负绌猴紒', -// }) -// } -// } -// catch (error) { -// // 澶勭悊閿欒 -// console.error(error); -// } -// } // 鏆傚仠 const handlea = async () => { try { @@ -422,8 +398,11 @@ if (response.code == 200) { // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫 ElMessage.success(response.message); - window.location.reload() + // window.location.reload() blinda.value = false; + // tableData.value = response.data + // tableData.value = []; + state.updateKey ++ } else { // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭� ElMessage.error(response.msg); @@ -454,9 +433,10 @@ if (response.code == 200) { // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫 ElMessage.success(response.message); - window.location.reload() + // window.location.reload() blindb.value = false; - } else { + state.updateKey ++ + // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭� ElMessage.error(response.msg); } @@ -474,11 +454,12 @@ } } onMounted(fetchTableData); -function getStatusText(state: number) { - switch (state) { +function getStatusText(state: number) { + switch (state) { case 0: return '绛夊緟涓�'; case 1: + return '涓婄墖涓�'; case 2: return '涓婄墖涓�'; case 100: @@ -596,7 +577,7 @@ <el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="danger" @click="handleBindb">鍋滄浠诲姟</el-button> <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;"> + <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;" :key="state.updateKey"> <el-table height="150" ref="table" diff --git a/UI-Project/src/views/StockBasicData/Select.vue b/UI-Project/src/views/StockBasicData/Select.vue index b7539d3..d0567d3 100644 --- a/UI-Project/src/views/StockBasicData/Select.vue +++ b/UI-Project/src/views/StockBasicData/Select.vue @@ -1,486 +1,49 @@ <script setup> -import {Search} from "@element-plus/icons-vue"; -import {reactive} from "vue"; -import {useRouter} from "vue-router" -const router = useRouter() - -import { ref } from 'vue' -import { ElMessage, ElMessageBox } from 'element-plus' -const dialogFormVisible = ref(false) -const dialogFormVisiblea = ref(false) -const box = ref(true) -const boxa = ref(false) -const boxb = ref(false) -// const tableData = [ -// { -// id: '1', -// long: '1005', -// wide: '183.6', -// thick: '1991', -// type: '5', -// typea: '1', -// }, -// { -// id: '2', -// long: '105', -// wide: '183', -// thick: '191', -// typea: '1', -// type: '5' -// }, -// { -// id: '2', -// long: '105', -// wide: '183', -// thick: '191', -// typea: '1', -// type: '5' -// }, -// ] -const tableData = ref([ -{ - id: '2', - ida: '2', - long: '105', - wide: '183', - thick: '191', - typea: '1', - typeb: '1', - typec: '1', - type: '5' - }, - { - id: '12', - ida: '12', - long: '1105', - wide: '1183', - thick: '1911', - typea: '11', - typeb: '11', - typec: '11', - type: '15' - }, -]) -// 鏂板涓�琛� -const addTableData = ()=>{ - const newRow = { - id: null, - id: null, - long: null, - wide: null, - thick: null, - typea: null, - type: null, - typeb: null, - typec: null, - } - tableData.value.push(newRow) -} -// 鍒犻櫎 -const deleteTableData = (row) =>{ - const index = tableData.value.indexOf(row); - if (index !== -1) { - tableData.value.splice(index, 1); - } -} -const tableDataa = [ - { - ida: '3', - longa: '1005', - widea: '183.6', - thicka: '1991', - }, - { - ida: '4', - longa: '105', - widea: '183', - thicka: '191', - } -] -const open = () => { - ElMessageBox.confirm( - '鏄惁鍒犻櫎璇ユ潯淇℃伅?', - '鎻愮ず', - { - confirmButtonText: '鏄�', - cancelButtonText: '鍙栨秷', - type: 'warning', - } - ) - .then(() => { - ElMessage({ - type: 'success', - message: '鍒犻櫎鎴愬姛锛�', - }) - }) - .catch(() => { - ElMessage({ - type: 'info', - message: '鍒犻櫎澶辫触', - }) - }) -} -const getTableRow = (row,type) =>{ - switch (type) { - case 'edit' :{ - //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅') - router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }}) - break - } - case 'delete':{ - alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅') - break - } - } +import {ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue" +import {useRouter} from "vue-router"; +let indexFlag=$ref(1) +function changeRouter(index){ + indexFlag=index } -const selectedRows = ref([]); -const handleSelectionChange = (selection) => { - selectedRows.value = selection; -}; -const showMessage = () => { - if (selectedRows.value.length === 0) { - ElMessage('璇疯嚦灏戦�夋嫨涓�涓�夐」') - } else{ - ElMessage({ - message: '鍑虹墖鎴愬姛锛�', - type: 'success', - }) - - } -}; -const pick = () => { - if (selectedRows.value.length === 0) { - ElMessage('璇疯嚦灏戦�夋嫨涓�涓�夐」') - } else{ - ElMessage({ - message: '鐮存崯鎴愬姛锛�', - type: 'success', - }) - - } -}; -const gridOptions = reactive({ - border: "full",//琛ㄦ牸鍔犺竟妗� - keepSource: true,//淇濇寔婧愭暟鎹� - align: 'center',//鏂囧瓧灞呬腑 - stripe:true,//鏂戦┈绾� - rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒 - id: 'OrderList', - showFooter: true,//鏄剧ず鑴� - printConfig: {}, - importConfig: {}, - exportConfig: {}, - scrollY:{ enabled: true },//寮�鍚櫄鎷熸粴鍔� - showOverflow:true, - columnConfig: { - resizable: true, - useKey: true - }, - filterConfig: { //绛涢�夐厤缃」 - remote: true - }, - customConfig: { - storage: true - }, - editConfig: { - trigger: 'click', - mode: 'row', - showStatus: true - }, - data: [ - { - 'id': '1', - 'long': '5', - 'wide': '1005', - 'thick': '183.6', - } - ], -}) </script> <template> - <div> - <el-button style="margin-top: 5px;margin-left: 5px;" id="searchButton" type="primary" @click="showMessage">鍑虹墖</el-button> - <el-button style="margin-top: 5px" id="searchButton" type="primary" @click="pick">鐮存崯</el-button> - <!-- <el-button style="margin-top: 5px" id="searchButton" type="primary" @click="dialogFormVisible = true">娣诲姞</el-button> --> - <el-button style="margin-top: 5px" id="searchButton" type="primary" @click="addTableData" >娣诲姞</el-button> - <el-button style="margin-top: 5px" id="searchButton" @click="boxb = true;box = false" >鍚堝苟</el-button> - <el-button style="margin-top: 5px" id="searchButton" @click="box = true;boxb = false" >鍗曠墖</el-button> + <!-- <div id="main-div"> --> + - <div v-if="box"> - <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;max-height: 450px;"> - <el-table height="100%" ref="table" - @selection-change="handleSelectionChange" - :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> - <el-table-column type="selection" width="55" /> - <el-table-column prop="id" align="center" label="鏍呮牸鍙�" min-width="80" > - <template #default="scope"> - <el-input v-model="scope.row.id" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="ida" align="center" label="id" min-width="80"> - <template #default="scope"> - <el-input v-model="scope.row.ida" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="long" align="center" label="闀�" min-width="100" > - <template #default="scope"> - <el-input v-model="scope.row.long" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="wide" align="center" label="瀹�" min-width="100"> - <template #default="scope"> - <el-input v-model="scope.row.wide" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="type" align="center" label="鍘氬害" min-width="100"> - <template #default="scope"> - <el-input v-model="scope.row.type" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="typea" align="center" label="鑶滅郴" min-width="100" > - <template #default="scope"> - <el-input v-model="scope.row.typea" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="typeb" align="center" label="鍑虹墖椤哄簭" min-width="120" > - <template #default="scope"> - <el-input v-model="scope.row.typeb" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="typec" align="center" label="娴佺▼鍗″彿" min-width="150"> - <template #default="scope"> - <el-input v-model="scope.row.typec" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="thick" align="center" label="鍏朵粬" min-width="120" > - <template #default="scope"> - <el-input v-model="scope.row.thick" size="small"></el-input> - </template> - </el-table-column> - <el-table-column fixed="right" label="鎿嶄綔" align="center" width="200"> - <template #default="scope"> - <el-button size="mini" type="text" plain @click="dialogFormVisiblea = true">璇︽儏</el-button> - <el-button @click="deleteTableData(scope.row)" link icon="Delete" type="primary">鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> -</div> - - </el-card> - </div> - <div v-if="boxb"> - <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;max-height: 450px;"> - <el-table height="100%" ref="table" - @selection-change="handleSelectionChange" - :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> - <el-table-column type="selection" width="55" /> - <el-table-column prop="id" align="center" label="鏍呮牸" min-width="80"> - <template #default="scope"> - <el-input v-model="scope.row.id" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="ida" align="center" label="id" min-width="80"> - <template #default="scope"> - <el-input v-model="scope.row.ida" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="long" align="center" label="闀�" min-width="120" > - <template #default="scope"> - <el-input v-model="scope.row.long" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="wide" align="center" label="瀹�" min-width="120"> - <template #default="scope"> - <el-input v-model="scope.row.wide" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="type" align="center" label="鍘氬害" min-width="120"> - <template #default="scope"> - <el-input v-model="scope.row.type" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="typea" align="center" label="鑶滅郴" min-width="120" > - <template #default="scope"> - <el-input v-model="scope.row.typea" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="typeb" align="center" label="鍑虹墖椤哄簭" min-width="120" > - <template #default="scope"> - <el-input v-model="scope.row.typeb" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="typec" align="center" label="娴佺▼鍗″彿" min-width="120"> - <template #default="scope"> - <el-input v-model="scope.row.typec" size="small"></el-input> - </template> - </el-table-column> - <el-table-column prop="thick" align="center" label="鍏朵粬" min-width="120" > - <template #default="scope"> - <el-input v-model="scope.row.thick" size="small"></el-input> - </template> - </el-table-column> - <el-table-column fixed="right" label="鎿嶄綔" align="center" width="200"> - <template #default="scope"> - <el-button size="mini" type="text" plain @click="dialogFormVisiblea = true">璇︽儏</el-button> - <el-button @click="deleteTableData(scope.row)" link icon="Delete" type="primary">鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> - </div> - </el-card> - </div> - </div> - <el-dialog v-model="dialogFormVisible" top="21vh" width="40%" title="娣诲姞" > - <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;"> - <el-form size="mini" label-width="150px"> - <el-form > - <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" /> - </el-form-item></div></div> - </el-col> - <el-col :span="9"> - <div id="dta" style="font-size: 15px;"> - <div> - <el-form-item label="id锛�" :required="true" style="width: 14vw"> - <el-input autocomplete="off" /> - </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: 13.2vw;margin-left: 14px;"> - <el-input 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-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: 13.2vw;margin-left: 14px;"> - <el-input 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-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: 13.2vw;margin-left: 14px;"> - <el-input 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-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: 13.2vw;margin-left: 14px;"> - <el-input autocomplete="off" /> - </el-form-item></div></div> - </el-col> - </el-row> - </el-form> - </el-form> - </div> - <template #footer> - <div id="dialog-footer"> - <el-button type="primary" @click="dialogFormVisible = false"> - 纭 - </el-button> - <el-button @click="dialogFormVisible = false">鍙栨秷</el-button> - </div> - </template> - </el-dialog> - <el-dialog v-model="dialogFormVisiblea" top="21vh" width="40%" title="鍘熺墖淇℃伅"> - <el-table height="100%" ref="table" :data="tableDataa" @row-click="handle"> - <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="station" - align="center" - label="宸ヤ綅" - min-width="120" - /> - </el-table> - <div style="text-align: center; height: 22px; margin-top: 30px;"> - <el-button @click="dialogFormVisiblea = false">鍏抽棴</el-button> - </div> - </el-dialog> + <div id="main-body"> + <router-view /> + </div> + <!-- </div> --> </template> <style scoped> - -#dt { display:block; float:left;line-height: 20px;margin-left: 100px;} -#dta { display:block; float:left;line-height: 20px;margin-left: 80%;} -#dialog-footer{ - text-align: center; - margin-top: -15px; +#main-div{ + width: 100%; + height: 100%; } -#message{ - text-align: center; - align-items: center; - color: black; - width: 200px; - height: 100px; - background-color: #337ecc; - margin-left: 28%; +#div-title{ + height: 2%; + width: 100%; } -#box{ - position: relative; - - #icon{ - position: absolute; - bottom:10px; - right: 19px; - } +#searchButton{ + margin-top: -5px; + margin-left: 1rem; +} +/* #searchButton1{ +//margin-left: 10rem; +} */ +/*main-body鏍峰紡*/ +#main-body{ + width: 100%; + height: 95%; + /* margin-top: 1%; */ +} +#select{ + margin-left:0.5rem; +} +:deep(.indexTag .el-breadcrumb__inner){ + color: #5CADFE !important; } </style> \ No newline at end of file diff --git a/UI-Project/src/views/StockBasicData/stockBasicData.vue b/UI-Project/src/views/StockBasicData/stockBasicData.vue index efba1a1..cdeb549 100644 --- a/UI-Project/src/views/StockBasicData/stockBasicData.vue +++ b/UI-Project/src/views/StockBasicData/stockBasicData.vue @@ -13,9 +13,13 @@ const tableData = ref([]) const slot = ref('') - +const requestData = { + line: 2001 +}; +request.post("/cacheGlass/taskCache/selectEdgTask",{ + ...requestData, -request.post("/cacheGlass/taskCache/selectEdgTask").then((res) => { +}).then((res) => { if (res.code == 200) { console.log(res.data); @@ -26,36 +30,11 @@ } }); - -// const getTableRow = (row,type) =>{ -// switch (type) { -// case 'delete':{ -// let flowData = ref({ -// id:0, -// slot:row.slot -// }) -// request.post("/cacheGlass/edgStorageCage/edgStorageCageGlass",flowData.value).then((res) => { -// if(res.code==200){ -// ElMessage.success(t('searchOrder.msgDeleteSuccess')) -// router.push({path:'/main/delivery/selectDelivery',query:{random:Math.random()}}) -// }else{ -// ElMessage.warning(res.msg) -// router.push("/login") -// } -// }) - -// return -// } -// } -// } -// let slots = ref({ -// id:0, -// slot: slot.value -// }) -const open = async(row) => { +// 鐮存崯 + const open = async(row) => { try { const confirmResult = await ElMessageBox.confirm( - '鏄惁鍒犻櫎璇ユ潯淇℃伅?', + '鏄惁鐮存崯璇ユ潯淇℃伅?', '鎻愮ず', { confirmButtonText: '鏄�', @@ -65,16 +44,16 @@ ); if (confirmResult === 'confirm') { // 鐢ㄦ埛鐐瑰嚮浜嗏�滄槸鈥濓紝鐜板湪璋冪敤鍒犻櫎鎺ュ彛 - const deleteResponse = await request.post("/cacheGlass/edgStorageCage/edgStorageCageGlass", { - id:0, - slot: row.slot + const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { + glassId: row.GlassId, + controlsId: 300 }) - if (response.code == 200) { - // 鍒犻櫎鎴愬姛锛屾偍鍙互鏍规嵁闇�瑕佸鐞嗘垚鍔熺殑鎯呭喌 - alert('鍒犻櫎鎴愬姛锛�'); + if (response.code === 200) { + ElMessage.success(response.message); } else { // 鍒犻櫎澶辫触锛屾偍鍙互澶勭悊閿欒鎴栨樉绀洪敊璇俊鎭粰鐢ㄦ埛 - alert('鍒犻櫎澶辫触锛�' + deleteResponse.message); + ElMessage.error(response.msg); + // alert('鍒犻櫎澶辫触锛�' + deleteResponse.message); } } } catch (error) { @@ -82,56 +61,37 @@ console.error('鍙戠敓閿欒:', error); } }; -// const open = () => { -// ElMessageBox.confirm( -// '鏄惁鍒犻櫎璇ユ潯淇℃伅?', -// '鎻愮ず', -// { -// confirmButtonText: '鏄�', -// cancelButtonText: '鍙栨秷', -// type: 'warning', -// } -// ) -// .then(() => { -// ElMessage({ -// type: 'success', -// message: '鍒犻櫎鎴愬姛锛�', -// }) -// }) -// .catch(() => { -// ElMessage({ -// type: 'info', -// message: '鍒犻櫎澶辫触', -// }) -// }) -// } -// 鍒犻櫎 -// const handleBindRacka = (row) => { -// adda.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗� -// }; -// // 鍒犻櫎 -// const handleConfirma = async () => { -// try { -// window.localStorage.setItem('slot', res.data.slot) -// let slot = window.localStorage.getItem('slot') -// const response = await request.post('/cacheGlass/edgStorageCage/edgStorageCageGlass', { -// slot: slot.value, -// id: 0 -// }); - -// if (response.code == 200) { -// // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫 -// ElMessage.success(response.message); -// adda.value = false; -// } else { -// // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭� -// ElMessage.error(response.msg); -// } -// } catch (error) { -// // 澶勭悊閿欒 -// console.error(error); -// } -// }; +// 鎷胯蛋 + const opena = async(row) => { + try { + const confirmResult = await ElMessageBox.confirm( + '鏄惁鎷胯蛋璇ユ潯淇℃伅?', + '鎻愮ず', + { + confirmButtonText: '鏄�', + cancelButtonText: '鍙栨秷', + type: 'warning', + } + ); + if (confirmResult === 'confirm') { + // 鐢ㄦ埛鐐瑰嚮浜嗏�滄槸鈥濓紝鐜板湪璋冪敤鍒犻櫎鎺ュ彛 + const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { + glassId: row.GlassId, + controlsId: 301 + }) + if (response.code === 200) { + ElMessage.success(response.message); + } else { + // 鍒犻櫎澶辫触锛屾偍鍙互澶勭悊閿欒鎴栨樉绀洪敊璇俊鎭粰鐢ㄦ埛 + ElMessage.error(response.msg); + // alert('鍒犻櫎澶辫触锛�' + deleteResponse.message); + } + } + } catch (error) { + // 澶勭悊鍙兘鍑虹幇鐨勯敊璇紝姣斿 ElMessageBox 鎶涘嚭鐨勫紓甯哥瓑 + console.error('鍙戠敓閿欒:', error); + } +}; const gridOptions = reactive({ border: "full",//琛ㄦ牸鍔犺竟妗� @@ -171,9 +131,6 @@ ] }) - - - </script> <template> @@ -183,28 +140,17 @@ <el-table height="240" ref="table" @selection-change="handleSelectionChange" :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> - <el-table-column prop="slot" align="center" label="id" min-width="80" /> - <el-table-column prop="glass_id" align="center" label="闀�" min-width="80" /> - <el-table-column prop="width" align="center" label="瀹�" min-width="120" /> - <el-table-column prop="height" align="center" label="鍘氬害" min-width="120" /> - <el-table-column prop="height" align="center" label="鑶滅郴" min-width="120" /> - <el-table-column prop="height" align="center" label="鍑虹墖椤哄簭" min-width="120" /> - <el-table-column prop="height" align="center" label="娴佺▼鍗″彿" min-width="120" /> - <el-table-column prop="height" align="center" label="鍏朵粬" min-width="120" /> - <el-table-column - align="center" - label="鍚敤鐘舵��" - min-width="80" - prop="enable_state" - > - <template #default="scope"> - <el-tag type="success" >{{ scope.row.enable_state==1?"鍚敤":"鏈惎鐢�" }}</el-tag> - </template> - </el-table-column> + <el-table-column prop="GlassId" align="center" label="鐜荤拑id" min-width="180" /> + <el-table-column prop="Height" align="center" label="楂�" min-width="80" /> + <el-table-column prop="Width" align="center" label="瀹�" min-width="120" /> + <el-table-column prop="Thickness" align="center" label="鍘氬害" min-width="120" /> + <el-table-column prop="FilmsId" align="center" label="鑶滅郴" min-width="120" /> + <el-table-column prop="SerialNumber" align="center" label="鍑虹墖椤哄簭" min-width="120" /> + <el-table-column prop="FlowCardId" align="center" label="娴佺▼鍗″彿" min-width="120" /> <el-table-column fixed="right" label="鎿嶄綔" align="center" width="200"> <template #default="scope"> - <el-button size="mini" type="text" plain @click="open(scope.row)">鐮存崯</el-button> - <el-button size="mini" type="text" plain @click="open(scope.row)">鍒犻櫎</el-button> + <el-button size="mini" type="text" plain @click="open(scope.row)">鐮存崯</el-button> + <el-button size="mini" type="text" plain @click="opena(scope.row)">鎷胯蛋</el-button> </template> </el-table-column> </el-table> diff --git a/UI-Project/src/views/StockBasicData/stockBasicDatatwo.vue b/UI-Project/src/views/StockBasicData/stockBasicDatatwo.vue new file mode 100644 index 0000000..da758c0 --- /dev/null +++ b/UI-Project/src/views/StockBasicData/stockBasicDatatwo.vue @@ -0,0 +1,183 @@ +<script setup> +import {Search} from "@element-plus/icons-vue"; +import {reactive} from "vue"; +import {useRouter} from "vue-router" +const router = useRouter() +const adda = ref(false) + +import request from "@/utils/request" +import { ref, onMounted } from "vue"; +// import { ref } from 'vue' +import { ElMessage, ElMessageBox } from 'element-plus' +// import LanguageMixin from './lang/LanguageMixin' + +const tableData = ref([]) +const slot = ref('') +const requestData = { + line: 2002 +}; +request.post("/cacheGlass/taskCache/selectEdgTask",{ + ...requestData, + +}).then((res) => { + if (res.code == 200) { + + console.log(res.data); + tableData.value = res.data + console.log(res.data[0].slot); + } else { + ElMessage.warning(res.msg) + + } + }); +// 鐮存崯 + const open = async(row) => { + try { + const confirmResult = await ElMessageBox.confirm( + '鏄惁鐮存崯璇ユ潯淇℃伅?', + '鎻愮ず', + { + confirmButtonText: '鏄�', + cancelButtonText: '鍙栨秷', + type: 'warning', + } + ); + if (confirmResult === 'confirm') { + // 鐢ㄦ埛鐐瑰嚮浜嗏�滄槸鈥濓紝鐜板湪璋冪敤鍒犻櫎鎺ュ彛 + const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { + glassId: row.GlassId, + controlsId: 300 + }) + if (response.code === 200) { + ElMessage.success(response.message); + } else { + // 鍒犻櫎澶辫触锛屾偍鍙互澶勭悊閿欒鎴栨樉绀洪敊璇俊鎭粰鐢ㄦ埛 + ElMessage.error(response.msg); + // alert('鍒犻櫎澶辫触锛�' + deleteResponse.message); + } + } + } catch (error) { + // 澶勭悊鍙兘鍑虹幇鐨勯敊璇紝姣斿 ElMessageBox 鎶涘嚭鐨勫紓甯哥瓑 + console.error('鍙戠敓閿欒:', error); + } +}; +// 鎷胯蛋 + const opena = async(row) => { + try { + const confirmResult = await ElMessageBox.confirm( + '鏄惁鎷胯蛋璇ユ潯淇℃伅?', + '鎻愮ず', + { + confirmButtonText: '鏄�', + cancelButtonText: '鍙栨秷', + type: 'warning', + } + ); + if (confirmResult === 'confirm') { + // 鐢ㄦ埛鐐瑰嚮浜嗏�滄槸鈥濓紝鐜板湪璋冪敤鍒犻櫎鎺ュ彛 + const response = await request.post("/cacheGlass/edgStorageCage/edgReportStatus", { + glassId: row.GlassId, + controlsId: 301 + }) + if (response.code === 200) { + ElMessage.success(response.message); + } else { + // 鍒犻櫎澶辫触锛屾偍鍙互澶勭悊閿欒鎴栨樉绀洪敊璇俊鎭粰鐢ㄦ埛 + ElMessage.error(response.msg); + // alert('鍒犻櫎澶辫触锛�' + deleteResponse.message); + } + } + } catch (error) { + // 澶勭悊鍙兘鍑虹幇鐨勯敊璇紝姣斿 ElMessageBox 鎶涘嚭鐨勫紓甯哥瓑 + console.error('鍙戠敓閿欒:', error); + } +}; + +const gridOptions = reactive({ + border: "full",//琛ㄦ牸鍔犺竟妗� + keepSource: true,//淇濇寔婧愭暟鎹� + align: 'center',//鏂囧瓧灞呬腑 + stripe:true,//鏂戦┈绾� + rowConfig: {isCurrent: true, isHover: true,height: 50},//榧犳爣绉诲姩鎴栭�夋嫨楂樹寒 + id: 'OrderList', + showFooter: true,//鏄剧ず鑴� + printConfig: {}, + importConfig: {}, + exportConfig: {}, + scrollY:{ enabled: true },//寮�鍚櫄鎷熸粴鍔� + showOverflow:true, + columnConfig: { + resizable: true, + useKey: true + }, + filterConfig: { //绛涢�夐厤缃」 + remote: true + }, + customConfig: { + storage: true + }, + editConfig: { + trigger: 'click', + mode: 'row', + showStatus: true + }, + data: [ + { + 'id': '1', + 'long': '5', + 'wide': '1005', + 'thick': '183.6', + } + ] + +}) +</script> + +<template> + <div> + <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="240" ref="table" + @selection-change="handleSelectionChange" + :data="tableData" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> + <el-table-column prop="GlassId" align="center" label="鐜荤拑id" min-width="180" /> + <el-table-column prop="Height" align="center" label="楂�" min-width="80" /> + <el-table-column prop="Width" align="center" label="瀹�" min-width="120" /> + <el-table-column prop="Thickness" align="center" label="鍘氬害" min-width="120" /> + <el-table-column prop="FilmsId" align="center" label="鑶滅郴" min-width="120" /> + <el-table-column prop="SerialNumber" align="center" label="鍑虹墖椤哄簭" min-width="120" /> + <el-table-column prop="FlowCardId" align="center" label="娴佺▼鍗″彿" min-width="120" /> + <el-table-column fixed="right" label="鎿嶄綔" align="center" width="200"> + <template #default="scope"> + <el-button size="mini" type="text" plain @click="open(scope.row)">鐮存崯</el-button> + <el-button size="mini" type="text" plain @click="opena(scope.row)">鎷胯蛋</el-button> + </template> + </el-table-column> + </el-table> + </div> + </el-card> + </div> +</template> + +<style scoped> + +#dt { display:block; float:left;line-height: 20px;margin-left: 100px;} +#dta { display:block; float:left;line-height: 20px;margin-left: 80%;} +#dialog-footer{ + text-align: center; + margin-top: -15px; +} +#message{ + text-align: center; + align-items: center; + color: black; + width: 200px; + height: 100px; + background-color: #337ecc; + margin-left: 28%; +} +#awatch{ + height: 460px; + /* margin-top: -60px; */ +} +</style> \ No newline at end of file -- Gitblit v1.8.0