From f39fd71eedfd828e715d33356a8c38ffbe66eb1a Mon Sep 17 00:00:00 2001 From: wuyouming666 <2265557248@qq.com> Date: 星期五, 24 五月 2024 15:28:09 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes --- UI-Project/src/views/StockBasicData/stockBasicData.vue | 216 +++++++++++++++++++++++++---------------------------- 1 files changed, 102 insertions(+), 114 deletions(-) diff --git a/UI-Project/src/views/StockBasicData/stockBasicData.vue b/UI-Project/src/views/StockBasicData/stockBasicData.vue index b4e4821..cdeb549 100644 --- a/UI-Project/src/views/StockBasicData/stockBasicData.vue +++ b/UI-Project/src/views/StockBasicData/stockBasicData.vue @@ -3,99 +3,96 @@ import {reactive} from "vue"; import {useRouter} from "vue-router" const router = useRouter() +const adda = ref(false) -import { ref } from 'vue' +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 = [ - { - id: '1', - long: '1005', - wide: '183.6', - thick: '1991', - type: '寰呰瘑鍒�', - typea: '1', - }, - { - id: '2', - long: '105', - wide: '183', - thick: '191', - typea: '1', - type: '寰呰瘑鍒�' - }, - { - id: '2', - long: '105', - wide: '183', - thick: '191', - typea: '1', - type: '寰呰瘑鍒�' - }, -] -const open = () => { - ElMessageBox.confirm( - '鏄惁鍒犻櫎璇ユ潯淇℃伅?', - '鎻愮ず', - { - confirmButtonText: '鏄�', - cancelButtonText: '鍙栨秷', - type: 'warning', - } - ) - .then(() => { - ElMessage({ - type: 'success', - message: '鍒犻櫎鎴愬姛锛�', - }) +const tableData = ref([]) +const slot = ref('') +const requestData = { + line: 2001 +}; +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 }) - .catch(() => { - ElMessage({ - type: 'info', - message: '鍒犻櫎澶辫触', - }) + 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 }) -} -const getTableRow = (row,type) =>{ - switch (type) { - case 'edit' :{ - //alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑缂栬緫淇℃伅') - router.push({path: '/main/returns/createReturns', query: { ReturnID: 'TH24010101' }}) - break - } - case 'delete':{ - alert('鎴戞帴鏀跺埌瀛愮粍浠朵紶閫佺殑鍒犻櫎淇℃伅') - break - } - } -} -const dialogForm = () => { - ElMessageBox.confirm( - '鏄惁鐮存崯?', - '鎻愮ず', - { - confirmButtonText: '鏄�', - cancelButtonText: '鍙栨秷', - type: 'warning', - } - ) - .then(() => { - // this.boxa = true - // this.box = false - - }) -} -const dialogForma = () => { - ElMessageBox.confirm( - '鏄惁鍒犻櫎璇ユ潯淇℃伅?', - '鎻愮ず', - { - confirmButtonText: '鏄�', - cancelButtonText: '鍙栨秷', - type: 'warning', - } - ) -} + 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,//淇濇寔婧愭暟鎹� @@ -131,36 +128,34 @@ 'wide': '1005', 'thick': '183.6', } - ], + ] + }) - </script> <template> <div> - <el-card style="flex: 1;margin-left: 10px;margin-top: 5px;" v-loading="loading"> - <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;max-height: 200px;"> - <el-table height="100%" ref="table" + <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="id" align="center" label="id" 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="wide" align="center" label="鍘氬害" min-width="120" /> - <el-table-column prop="wide" align="center" label="鑶滅郴" min-width="120" /> - <el-table-column prop="wide" align="center" label="鍑虹墖椤哄簭" min-width="120" /> - <el-table-column prop="wide" align="center" label="娴佺▼鍗″彿" min-width="120" /> - <el-table-column prop="wide" align="center" label="鍏朵粬" min-width="120" /> + <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> - <el-button size="mini" type="text" plain @click="dialogForm">鐮存崯</el-button> - <el-button size="mini" type="text" plain @click="dialogForma">鍒犻櫎</el-button> + <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> @@ -182,14 +177,7 @@ margin-left: 28%; } #awatch{ - height: 450px; -} -#main-body{ - margin-top: -20px; - margin-left: 300px; -} -#main-bodya{ - margin-top: -10px; - margin-left: 100px; + height: 460px; + /* margin-top: -60px; */ } </style> \ No newline at end of file -- Gitblit v1.8.0