快乐的昕的电脑
2025-10-08 99227892dd3c52a488cc594eb530e5a75b8491ea
components/mold.vue
@@ -6,6 +6,15 @@
      <view class="top-section">
         <view class="form-group">
            <label>选择刀具编号:</label>
            <view class="form-group">
               <label>设置使用上限:</label>
               <input class="input"
                     type="number"
                     v-model="useLimitInput"
                     placeholder="每次换刀后手填"
                     :disabled="!selectedToolNo" />
               <button class="btn-blue" @click="setUseLimit" :disabled="!selectedToolNo || !useLimitInput">保存上限</button>
            </view>
            <select v-model="selectedToolNo">
               <option v-for="tool in toolList" :key="tool.no" :value="tool.no">{{ tool.no }} | {{ tool.name }}</option>
            </select>
@@ -107,6 +116,7 @@
            showToolDialog: false,
            searchKey: '',
            filteredTools: [],
                useLimitInput: '',
            toolRecords: [
               // 示例数据,实际应从后端接口获取
               { id: 1, no: 'T22050338', name: 'm1.5合金长刀', upTime: '7-13 9:00', upCount: 15, downTime: '7-13 19:00', downCount: 3115, useCount: 3100, useLimit: 8888, lifePercent: '34.88%', lifeWarn: '90%', warnStatus: '正常' }