From 270a7479cdb5cc70395c0703e46b28108e008923 Mon Sep 17 00:00:00 2001
From: 快乐的昕的电脑 <快乐的昕的电脑@DESKTOP-C2BQPQU>
Date: 星期三, 22 十月 2025 11:20:08 +0800
Subject: [PATCH] 调试2
---
components/machine.vue | 73 +++++++++++++++++++-----------------
1 files changed, 39 insertions(+), 34 deletions(-)
diff --git a/components/machine.vue b/components/machine.vue
index a9938be..45f567e 100644
--- a/components/machine.vue
+++ b/components/machine.vue
@@ -32,14 +32,14 @@
<input class="txt-inp" v-model="maShoutTime" placeholder="鐐瑰嚮鎸夐挳甯﹀嚭鏃堕棿" disabled="true" />
</view>
<!--<view class="item">-->
- <!-- 璋冩満瀹屾垚鎸夐挳锛宮aEndTime鏈夊�兼椂绂佺敤 -->
- <!--<button :class="maEndTime ? 'btn-disabled' : 'btn-blue'"
- :disabled="!!maEndTime"
- @click="handleMaEndTime">
- 璋冩満瀹屾垚锛�=妫�楠岄�氳繃锛�
- </button>-->
- <!-- 鏄剧ず璋冩満瀹屾垚鏃堕棿 -->
- <!--<input class="txt-inp" v-model="maEndTime" placeholder="棣栨棣栨纭閫氳繃鍐欏叆" disabled="true" />
+ <!-- 璋冩満瀹屾垚鎸夐挳锛宮aEndTime鏈夊�兼椂绂佺敤 -->
+ <!--<button :class="maEndTime ? 'btn-disabled' : 'btn-blue'"
+ :disabled="!!maEndTime"
+ @click="handleMaEndTime">
+ 璋冩満瀹屾垚锛�=妫�楠岄�氳繃锛�
+ </button>-->
+ <!-- 鏄剧ず璋冩満瀹屾垚鏃堕棿 -->
+ <!--<input class="txt-inp" v-model="maEndTime" placeholder="棣栨棣栨纭閫氳繃鍐欏叆" disabled="true" />
</view>-->
<view class="item">
<button class="btn-disabled" disabled>
@@ -86,12 +86,12 @@
},
methods: {
// 澶勭悊璋冩満寮�濮嬫寜閽偣鍑�
- handleMaStartTime() {
- if (!this.maStartTime) {
- this.setMaStartTime();
- this.flag = -1; // 璋冩満寮�濮嬫寜閽寜涓嬫椂鍥炰紶鐨刦lag=-1
- }
- },
+ handleMaStartTime() {
+ if (!this.maStartTime) {
+ this.setMaStartTime();
+ this.flag = -1; // 璋冩満寮�濮嬫寜閽寜涓嬫椂鍥炰紶鐨刦lag=-1
+ }
+ },
// 澶勭悊閫佹鍛煎彨鎸夐挳鐐瑰嚮
handleMaShoutTime() {
if (!this.maShoutTime) {
@@ -117,16 +117,25 @@
refresh() {
this.findByOrderId();
},
+ // 鍏ㄧ晫闈㈠埛鏂帮細娓呯┖鏈湴鐘舵�佸悗閲嶆柊鎷夊彇锛堜笉鍒犻櫎浠讳綍鍘熸湁娉ㄩ噴锛�
+ fullReload() {
+ // 娓呯┖褰撳墠鏄剧ず鏁版嵁锛岄伩鍏嶆棫鏁版嵁鐭殏闂儊
+ this.maShoutTime = '';
+ this.maStartTime = '';
+ this.maEndTime = '';
+ this.statusForm = {};
+ this.flag = -1;
+ // 涓嬩竴甯ч噸鏂拌幏鍙�
+ this.$nextTick(() => {
+ this.findByOrderId();
+ });
+ },
// 淇濆瓨骞剁敓鏁堬紝灏嗘椂闂寸瓑淇℃伅鎻愪氦鍒板悗绔�
save() {
if (!this.statusForm.id) {
this.$showMessage("id涓虹┖锛屼笉鍏佽鎺ㄩ��");
return;
}
- // 鍙閫佹鍛煎彨鏈夊�硷紝flag寮哄埗涓�-1
- if (this.maShoutTime) {
- this.flag = -1;
- }
this.$post({
url: "/MesOrderSta/ChangeMachineTime",
data: {
@@ -141,9 +150,8 @@
}).then(res => {
if (res.data.tbBillList) {
this.$showMessage("鍛煎彨鎴愬姛");
- this.findByOrderId();
- this.FindByOrderNo();// 淇濆瓨鍚庡埛鏂�
- this.refresh(); // 淇濆瓨鍚庡埛鏂�
+ // 鍛煎彨鎴愬姛鍚庡埛鏂版暣涓晫闈�
+ this.fullReload();
} else {
this.$showMessage("鍛煎彨澶辫触");
this.cancel();
@@ -157,19 +165,16 @@
this.maEndTime = this.statusForm.maEndTime;
},
// 閫佹鍛煎彨锛宨tem=1鏃惰缃�佹鍛煎彨鏃堕棿
- stateCheck(item) {
- switch (item) {
- case 0:
- break;
- case 1:
- this.maShoutTime = this.$getDate('yyyy-mm-dd hh24:mi:ss');
- this.flag = -1; // 閫佹鍛煎彨鏈夊�煎悗锛宖lag濮嬬粓涓�-1
- break;
- case 2:
- break;
- }
- this.flag = item;
- },
+ stateCheck(item) {
+ switch (item) {
+ case 1:
+ this.maShoutTime = this.$getDate('yyyy-mm-dd hh24:mi:ss');
+ // 鑻ヤ笉甯屾湜瑙﹀彂鑷姩棣栨锛屼繚鎸� -1
+ this.flag = -1;
+ break;
+ }
+ // 涓嶅啀鍐� this.flag = item;
+ },
// 鏍规嵁宸ュ崟鍙�/ID鑾峰彇宸ュ崟鐘舵�佹暟鎹�
findByOrderId() {
this.$post({
--
Gitblit v1.9.3