From 7ce0e7ec84b19ec5550eb2a1353b43ff59ad40d1 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期六, 22 十一月 2025 11:01:30 +0800
Subject: [PATCH] 调试
---
pages/index.vue | 158 ++++++++++++++++++++++++++++++++--------------------
1 files changed, 97 insertions(+), 61 deletions(-)
diff --git a/pages/index.vue b/pages/index.vue
index 3495d37..801878a 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -552,51 +552,37 @@
}
return str;
},
- methods: {
- // 鍒�鍏风粦瀹氬垽鏂挬瀛�
- hasBindedCutter() {
- const currentOrder = this.isShowTableData[0];
- return (
- currentOrder &&
- (
- (currentOrder.outToolId && currentOrder.outToolId.toString().trim() !== '') ||
- (currentOrder.outToolCode && currentOrder.outToolCode.trim() !== '') ||
- (currentOrder.outToolName && currentOrder.outToolName.trim() !== '')
- )
- );
- },
+ cancel() {
+ if (!this.machineNo) {
+ return;
+ }
- cancel() {
- if (!this.machineNo) {
- return;
- }
-
- // 浣跨敤閽╁瓙鍒ゆ柇
- if (this.hasBindedCutter()) {
- uni.showToast({
- title: '褰撳墠宸ュ崟宸茬粦瀹氬垁鍏凤紝涓嶈兘娓呯┖閲嶉��',
- icon: 'error',
- duration: 2000
- });
- return;
- }
-
- let editDate = this.formatDate(new Date());
- this.selectedIndexs = [];
-
- this.$post({
- url: "/MesOrderSelect/Remove",
- data: {
- machineNo: this.machineNo,
- editDate: editDate
- },
- }).then(res => {
- if (res.data.tbBillList > 0) {
- this.isShowTableData = [];
- }
+ // 鐩存帴鐢� flag 鍒ゆ柇
+ if (this.hasBindedCutterFlag) {
+ uni.showToast({
+ title: '褰撳墠宸ュ崟宸茬粦瀹氬垁鍏凤紝涓嶈兘娓呯┖閲嶉��',
+ icon: 'error',
+ duration: 2000
});
- },
+ return;
+ }
+
+ let editDate = this.formatDate(new Date());
+ this.selectedIndexs = [];
+
+ this.$post({
+ url: "/MesOrderSelect/Remove",
+ data: {
+ machineNo: this.machineNo,
+ editDate: editDate
+ },
+ }).then(res => {
+ if (res.data.tbBillList > 0) {
+ this.isShowTableData = [];
+ }
+ });
+ },
formatDate(date) {
let year = date.getFullYear(); // 鑾峰彇骞翠唤
@@ -653,22 +639,33 @@
})
},
//鑾峰彇琛ㄦ牸鐨勬暟鎹簮
- getWomdaaIsShow() {
- this.$post({
- url: "/Womdaa/GetWomdaasByShow",
- data: {
- machineNo: this.machineNo,
- }
- }).then(res => {
- this.isShowTableData = res.data.tbBillList;
+ getWomdaaIsShow() {
+ this.$post({
+ url: "/Womdaa/GetWomdaasByShow",
+ data: {
+ machineNo: this.machineNo,
+ }
+ }).then(res => {
+ this.isShowTableData = res.data.tbBillList;
- if (this.isShowTableData.length == 1) {
- uni.setStorageSync('daa001', this.isShowTableData[0].daa001);
- uni.setStorageSync('id', this.isShowTableData[0].id);
- //this.toDetail(this.isShowTableData[0]);
- }
- });
- },
+ // 鍙垽鏂涓�鏉★紙鍙厑璁镐竴鏉″伐鍗曪級
+ 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() !== '');
+ }
+ // 瀛樺偍鍒� data 鍙橀噺
+ this.hasBindedCutterFlag = hasBindedCutter;
+
+ if (this.isShowTableData.length == 1) {
+ uni.setStorageSync('daa001', this.isShowTableData[0].daa001);
+ uni.setStorageSync('id', this.isShowTableData[0].id);
+ }
+ });
+ },
isShowTab() {
if (this.isShowTableData.length > 0) {
@@ -682,10 +679,14 @@
this.isShow = true;
// 榛樿閫変腑鈥滃緟寮�宸モ��
- this.engineeringNo = '寰呭紑宸�';
+ this.engineeringNo = '寰呭紑宸ャ�佹湭寮�宸ャ�佹殏鍋�';
this.tableData = [];
- // 涓嬫媺妗嗗彧鏄剧ず宸ュ崟鐘舵��
- this.engineeringNoMapList = ['寰呭紑宸�', '鏈紑宸�', '寮�宸�', '鏆傚仠', '瀹屽伐'];
+ // 涓嬫媺妗嗗彧鏄剧ず鍚堝苟鍚庣殑鐘舵�佸拰鍏跺畠鐘舵��
+ this.engineeringNoMapList = [
+ '寰呭紑宸ャ�佹湭寮�宸ャ�佹殏鍋�',
+ '寮�宸�',
+ '瀹屽伐'
+ ];
// 榛樿鏄剧ず鈥滃緟寮�宸モ�濆伐鍗�
this.getWomdaaByStatus();
},
@@ -711,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 => {
@@ -1012,6 +1019,35 @@
}
}
+ /* 鏀惧ぇ uni-table 鐨勫閫夋锛坈heckbox锛� */
+ :deep(.uni-table .uni-checkbox-wrapper),
+ :deep(.uni-table .uni-checkbox-input) {
+ width: 48px !important;
+ height: 48px !important;
+ min-width: 48px !important;
+ min-height: 48px !important;
+ display: flex !important;
+ align-items: center !important;
+ justify-content: center !important;
+ box-sizing: border-box !important;
+ }
+
+ /* 鍙 input[type=checkbox] 鏀惧ぇ锛屼笉瑕佸姞 :deep() */
+ .uni-table .uni-checkbox-input input[type="checkbox"] {
+ transform: scale(2.2) !important;
+ accent-color: #007aff !important;
+ cursor: pointer !important;
+ }
+
+ /* 鏀惧ぇ uni-table 鐨勫閫夋鍒楀 */
+ :deep(.uni-table .uni-table-selection),
+ :deep(.uni-table th.is-selection),
+ :deep(.uni-table td.is-selection) {
+ width: 100px !important;
+ min-width: 100px !important;
+ max-width: 120px !important;
+ }
+
/* 閽堝1280x800鐨勫钩鏉夸娇鐢ㄥ獟浣撴煡璇㈣繘琛岄�傞厤 */
@media screen and (min-width: 1280px) and (max-width: 1920px) {
.right-side {
--
Gitblit v1.9.3