| | |
| | | <span class="unit-text">%</span> |
| | | </view> |
| | | </view> |
| | | <!-- 新增:刷新按钮 --> |
| | | <view class="form-cell" style="flex:0 0 auto; margin-left:16px;"> |
| | | <button class="btn-blue large-btn" @click="handleRefresh" :disabled="loadingForm || submitting">刷新</button> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 第二行:在最后添加刀具目录按钮 --> |
| | |
| | | toolModel() { this.isDirty = true; } |
| | | }, |
| | | methods: { |
| | | // 新增:刷新按钮处理方法 |
| | | async handleRefresh() { |
| | | // 刷新刀具列表和表单数据 |
| | | this.fetchTools(''); |
| | | if (this.machineNo && this.workOrderNo) { |
| | | await this.fetchFormData(); |
| | | await this.fetchDefaultToolFromWorkOrder(); |
| | | } |
| | | this.$showMessage('刷新完成'); |
| | | }, |
| | | // 自动保存:启动 |
| | | startAutoSave() { |
| | | if (!this.autoSaveEnabled) return; |