From 00d508740cd6eef96cfedc98965239e69ac2d9d6 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期六, 22 十一月 2025 10:43:57 +0800
Subject: [PATCH] 调试
---
pages/index.vue | 90 ++++++++++++++++++++++++++++-----------------
1 files changed, 56 insertions(+), 34 deletions(-)
diff --git a/pages/index.vue b/pages/index.vue
index 1e54aa2..9e6e43c 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -553,20 +553,13 @@
return str;
},
- // 鍒�鍏风粦瀹氬垽鏂挬瀛� (浼樺寲鐗�)
- hasBindedCutter() {
- const o = this.isShowTableData[0];
- if (!o) return false;
- return ['outToolId', 'outToolCode', 'outToolName'].some(k => {
- const v = o[k];
- return v !== undefined && v !== null && v.toString().trim() !== '';
- });
- },
-
cancel() {
- if (!this.machineNo) return;
+ if (!this.machineNo) {
+ return;
+ }
- if (this.hasBindedCutter()) {
+ // 鐩存帴鐢� flag 鍒ゆ柇
+ if (this.hasBindedCutterFlag) {
uni.showToast({
title: '褰撳墠宸ュ崟宸茬粦瀹氬垁鍏凤紝涓嶈兘娓呯┖閲嶉��',
icon: 'error',
@@ -577,6 +570,7 @@
let editDate = this.formatDate(new Date());
this.selectedIndexs = [];
+
this.$post({
url: "/MesOrderSelect/Remove",
data: {
@@ -652,25 +646,21 @@
machineNo: this.machineNo,
}
}).then(res => {
- let list = res.data.tbBillList || [];
- // 褰掍竴鍖栧垁鍏峰瓧娈�
- this.isShowTableData = list.map(row => {
- return {
- ...row,
- outToolId: row.outToolId ?? row.out_tool_id ?? row.outToolID ?? row.toolId ?? row.ToolId,
- outToolCode: row.outToolCode ?? row.out_tool_code ?? row.toolCode ?? row.ToolCode,
- outToolName: row.outToolName ?? row.out_tool_name ?? row.toolName ?? row.ToolName,
- };
- });
- if (this.isShowTableData.length > 0) {
- console.log("宸ュ崟棣栨潯瀹屾暣鏁版嵁:", JSON.stringify(this.isShowTableData[0]));
- console.log("鍒�鍏峰瓧娈�:",
- this.isShowTableData[0].outToolId,
- this.isShowTableData[0].outToolCode,
- this.isShowTableData[0].outToolName
- );
+ this.isShowTableData = res.data.tbBillList;
+
+ // 鍙垽鏂涓�鏉★紙鍙厑璁镐竴鏉″伐鍗曪級
+ const order = this.isShowTableData[0];
+ let hasBindedCutter = false;
+ if (order) {
+ hasBindedCutter =
+ (order.outToolId && order.outToolId.toString().trim() !== '') ||
+ (order.outToolCode && order.outToolCode.trim() !== '') ||
+ (order.outToolName && order.outToolName.trim() !== '');
}
- if (this.isShowTableData.length === 1) {
+ // 瀛樺偍鍒� data 鍙橀噺
+ this.hasBindedCutterFlag = hasBindedCutter;
+
+ if (this.isShowTableData.length == 1) {
uni.setStorageSync('daa001', this.isShowTableData[0].daa001);
uni.setStorageSync('id', this.isShowTableData[0].id);
}
@@ -689,10 +679,14 @@
this.isShow = true;
// 榛樿閫変腑鈥滃緟寮�宸モ��
- this.engineeringNo = '寰呭紑宸�';
+ this.engineeringNo = '寰呭紑宸ャ�佹湭寮�宸ャ�佹殏鍋�';
this.tableData = [];
- // 涓嬫媺妗嗗彧鏄剧ず宸ュ崟鐘舵��
- this.engineeringNoMapList = ['寰呭紑宸�', '鏈紑宸�', '寮�宸�', '鏆傚仠', '瀹屽伐'];
+ // 涓嬫媺妗嗗彧鏄剧ず鍚堝苟鍚庣殑鐘舵�佸拰鍏跺畠鐘舵��
+ this.engineeringNoMapList = [
+ '寰呭紑宸ャ�佹湭寮�宸ャ�佹殏鍋�',
+ '寮�宸�',
+ '瀹屽伐'
+ ];
// 榛樿鏄剧ず鈥滃緟寮�宸モ�濆伐鍗�
this.getWomdaaByStatus();
},
@@ -718,11 +712,17 @@
// 鎸夊伐鍗曠姸鎬佺瓫閫夊伐鍗�
getWomdaaByStatus() {
let editDate = this.formatDate(new Date());
+ let statusArr = [];
+ if (this.engineeringNo === '寰呭紑宸ャ�佹湭寮�宸ャ�佹殏鍋�') {
+ statusArr = ['寰呭紑宸�', '鏈紑宸�', '鏆傚仠'];
+ } else {
+ statusArr = [this.engineeringNo];
+ }
this.$post({
url: "/Womdaa/GetWomdaasByEngineeringNo",
data: {
machineNo: this.machineNo,
- orderStatus: [this.engineeringNo], // 鍙紶閫変腑鐨勭姸鎬�
+ orderStatus: statusArr,
editDate: editDate
}
}).then(res => {
@@ -1019,6 +1019,28 @@
}
}
+ /* 鏀惧湪 style 鏍囩鏈�鍚庯紝纭繚浼樺厛绾� */
+ ::v-deep .uni-table .uni-checkbox-wrapper,
+ ::v-deep .uni-table .uni-checkbox-input {
+ width: 55px !important;
+ height: 55px !important;
+ min-width: 55px !important;
+ min-height: 55px !important;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+
+ ::v-deep .uni-table .uni-checkbox-input {
+ border-radius: 10px !important;
+ border: 2.5px solid #007aff !important;
+ }
+
+ ::v-deep .uni-table .uni-checkbox-input .uni-checkbox-icon {
+ font-size: 38px !important;
+ line-height: 55px !important;
+ }
+
/* 閽堝1280x800鐨勫钩鏉夸娇鐢ㄥ獟浣撴煡璇㈣繘琛岄�傞厤 */
@media screen and (min-width: 1280px) and (max-width: 1920px) {
.right-side {
--
Gitblit v1.9.3