| | |
| | | <template> |
| | | <!-- 刀具管理 --> |
| | | <view class="page"> |
| | | <!-- 顶部Tab栏(如有需要可保留) --> |
| | | <!-- 刀具选择区 --> |
| | | <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"> |
| | | <view class="form-row"> |
| | | <label class="form-label">选择刀具编号:</label> |
| | | <select v-model="selectedToolNo" class="form-select"> |
| | | <option v-for="tool in toolList" :key="tool.no" :value="tool.no">{{ tool.no }} | {{ tool.name }}</option> |
| | | </select> |
| | | <button class="btn-blue" @click="showToolDialog = true">刀具目录</button> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label>刀具名称:</label> |
| | | <view class="form-row"> |
| | | <label class="form-label">设置使用上限:</label> |
| | | <input class="input" type="number" v-model="useLimitInput" placeholder="每次换刀后手填" :disabled="!selectedToolNo" /> |
| | | <button class="btn-blue" @click="setUseLimit" :disabled="!selectedToolNo || !useLimitInput">保存上限</button> |
| | | </view> |
| | | <view class="form-row"> |
| | | <label class="form-label">刀具名称:</label> |
| | | <input class="input" v-model="toolName" placeholder="刀具带出" disabled /> |
| | | </view> |
| | | <view class="form-group"> |
| | | <label>规格型号:</label> |
| | | <view class="form-row"> |
| | | <label class="form-label">规格型号:</label> |
| | | <input class="input" v-model="toolModel" placeholder="刀具带出" disabled /> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 操作按钮 --> |
| | | <view class="button-row"> |
| | | <button class="save-btn" @click="handleUpTool">上刀提交</button> |
| | | <button class="save-btn" @click="handleDownTool">下刀提交</button> |
| | | <button class="cancel-btn" @click="cancel">取消</button> |
| | | </view> |
| | | |
| | | <!-- 刀具目录弹窗 --> |
| | |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | </view> |
| | | |
| | | <!-- 上下刀按钮 --> |
| | | <view class="bottom-section"> |
| | | <button class="save-btn" @click="handleUpTool">上刀提交</button> |
| | | <button class="save-btn" @click="handleDownTool">下刀提交</button> |
| | | <button class="cancel-btn" @click="cancel">取消</button> |
| | | </view> |
| | | |
| | | <!-- 说明 --> |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .form-row { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-bottom: 1.2vh; |
| | | } |
| | | |
| | | .form-label { |
| | | width: 120px; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .form-select { |
| | | width: 220px; |
| | | padding: 1vh; |
| | | font-size: 1.1vw; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .button-row { |
| | | display: flex; |
| | | justify-content: center; |
| | | gap: 32px; |
| | | margin: 2vh 0; |
| | | } |
| | | |
| | | .page { |
| | | padding: 2vh; |
| | | display: flex; |