From cdef1c2c7f4703776ff598e34d897d6dce449735 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期二, 18 十一月 2025 17:38:51 +0800
Subject: [PATCH] Revert "调试"
---
pages/index.vue | 119 ++++++++++++++++++++++++++++-------------------------------
1 files changed, 57 insertions(+), 62 deletions(-)
diff --git a/pages/index.vue b/pages/index.vue
index e54f119..11b7a01 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -553,45 +553,49 @@
return str;
},
- // 鍒ゆ柇鍗曟潯璁板綍鏄惁缁戝畾鍒�鍏�
- isCutterBound(row) {
- if (!row) return false;
- const idBound = typeof row.outToolId === 'number' ? row.outToolId > 0 : (
- row.outToolId && row.outToolId.toString().trim() !== ''
- );
- const codeBound = !!(row.outToolCode && row.outToolCode.toString().trim() !== '');
- const nameBound = !!(row.outToolName && row.outToolName.toString().trim() !== '');
- return idBound || codeBound || nameBound;
- },
+ // 鍒�鍏风粦瀹氬垽鏂挬瀛�
+ hasBindedCutter() {
+ const currentOrder = this.isShowTableData[0];
+ return (
+ currentOrder &&
+ (
+ (currentOrder.outToolId && currentOrder.outToolId.toString().trim() !== '') ||
+ (currentOrder.outToolCode && currentOrder.outToolCode.trim() !== '') ||
+ (currentOrder.outToolName && currentOrder.outToolName.trim() !== '')
+ )
+ );
+ },
- // 鏃х殑閽╁瓙鏇挎崲涓鸿皟鐢� isCutterBound(鍙湅绗竴鏉℃垨鏍规嵁闇�瑕侀亶鍘�)
- hasBindedCutter() {
- // 褰撳墠鍙厑璁镐竴鏉℃鍦ㄦ搷浣滅殑宸ュ崟锛屽彇绗竴鏉�
- return this.isCutterBound(this.isShowTableData[0]);
- },
-
- cancel() {
- if (!this.machineNo) return;
- // 鍚庣鏁版嵁鍒ゆ柇
- if (this.hasBindedCutter()) {
- uni.showToast({
- title: '褰撳墠宸ュ崟宸茬粦瀹氬垁鍏凤紝涓嶈兘娓呯┖閲嶉��',
- icon: 'error',
- duration: 2000
- });
- return;
- }
- const editDate = this.formatDate(new Date());
- this.selectedIndexs = [];
- this.$post({
- url: "/MesOrderSelect/Remove",
- data: { machineNo: this.machineNo, editDate }
- }).then(res => {
- if (res.data.tbBillList > 0) {
- this.isShowTableData = [];
+ 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 = [];
+ }
+ });
+ },
formatDate(date) {
let year = date.getFullYear(); // 鑾峰彇骞翠唤
@@ -648,31 +652,22 @@
})
},
//鑾峰彇琛ㄦ牸鐨勬暟鎹簮
- getWomdaaIsShow() {
- this.$post({
- url: "/Womdaa/GetWomdaasByShow",
- data: { machineNo: this.machineNo }
- }).then(res => {
- const list = res.data.tbBillList || [];
- // 缁熶竴鏄犲皠骞惰緭鍑鸿皟璇曟棩蹇�
- this.isShowTableData = list.map(r => {
- return {
- ...r,
- // 鍏煎澶у皬鍐欐垨涓嬪垝绾垮懡鍚�(鑻ヤ笉瀛樺湪鍒欎娇鐢ㄥ師鍊兼垨绌�)
- outToolId: r.outToolId ?? r.out_tool_id ?? r.outToolID ?? r.toolId ?? 0,
- outToolCode: r.outToolCode ?? r.out_tool_code ?? r.toolCode ?? '',
- outToolName: r.outToolName ?? r.out_tool_name ?? r.toolName ?? ''
- };
- });
- if (this.isShowTableData.length > 0) {
- console.log("GetWomdaasByShow 绗竴鏉¤褰�:", this.isShowTableData[0]);
- }
- if (this.isShowTableData.length === 1) {
- uni.setStorageSync('daa001', this.isShowTableData[0].daa001);
- uni.setStorageSync('id', this.isShowTableData[0].id);
- }
- });
- },
+ 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]);
+ }
+ });
+ },
isShowTab() {
if (this.isShowTableData.length > 0) {
--
Gitblit v1.9.3